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.
|
|
|
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)),
|
|
|
|
content: StatefulBuilder(
|
|
|
|
builder: (BuildContext context, StateSetter setState) {
|
|
|
|
return Container(
|
|
|
|
color: Colors.white,
|
|
|
|
height: SizeConfig.realScreenHeight * 0.5,
|
|
|
|
width: SizeConfig.realScreenWidth * 0.8,
|
|
|
|
child: Container());
|
|
|
|
}),
|
|
|
|
);
|
|
|
|
|
|
|
|
// show the dialog
|
|
|
|
showDialog(
|
|
|
|
context: context,
|
|
|
|
builder: (BuildContext context) {
|
|
|
|
return alert;
|
|
|
|
},
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
static closeAlertDialog(BuildContext context) {
|
|
|
|
Navigator.of(context).pop();
|
|
|
|
}
|
|
|
|
}
|