You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
diplomatic-quarter/lib/widgets/robo-search/robosearch.dart

43 lines
1.1 KiB
Dart

4 years ago
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/robo-search/search.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class RoboSearch {
final BuildContext context;
RoboSearch({
@required this.context,
});
showAlertDialog(BuildContext context) {
// set up the buttons
// set up the AlertDialog
AlertDialog alert = AlertDialog(
title: Center(child: Text(TranslationBase.of(context).search)),
4 years ago
content: StatefulBuilder(
builder: (BuildContext context, StateSetter setState) {
return Container(
color: Colors.white,
height: SizeConfig.realScreenHeight * 0.5,
width: SizeConfig.realScreenWidth * 0.8,
child: SearchBot());
}),
4 years ago
);
// show the dialog
showDialog(
context: context,
builder: (BuildContext context) {
return alert;
},
);
}
static closeAlertDialog(BuildContext context) {
Navigator.of(context).pop();
}
}