content property

  1. @override
String get content
override

Store the content that will be written to the file in a String or Future

Implementation

@override
String get content => '''$import

@singleton
class LoadingDialog {
BuildContext? _context;

show(BuildContext context) {
  _context = context;
  AlertDialog alert = AlertDialog(
    content: Row(
      children: const [
        CircularProgressIndicator(),
      ],
    ),
  );
  showDialog(
    barrierDismissible: false,
    context: context,
    builder: (BuildContext context) {
      return alert;
    },
  );
}

void hide() {
  _context?.popRoute();
}
}
''';