show method

  1. @override
void show(
  1. BuildContext context,
  2. String completerId, {
  3. dynamic data,
})
override

Implementation

@override
void show(BuildContext context, String completerId, {dynamic data}) {
  showDialog(
    barrierDismissible: false,
    context: context,
    builder: (context) => UpAlertDialog(
      title: UpText(data['title']),
      content: UpText(data['text']),
      actions: data['actions']
          .map<Widget>((action) => SizedBox(
                // width: 100,
                child: UpButton(
                    text: action['text'],
                    onPressed: () {
                      if (action['onPressed'] != null) {
                        action['onPressed']();
                      }
                      ServiceManager<UpDialogService>().completeDialog(
                          context: context,
                          completerId: completerId,
                          result: null);
                    }),
              ))
          .toList(),
    ),
  );
}