Migration guide from progress_dialog to otis?
Opened this issue · 2 comments
Deleted user commented
Is there a guide or can you tell me how I can migrate this code to OTS?
ProgressDialog _contextProgressDialog({required BuildContext context}) {
var dialog = ProgressDialog(context, type: ProgressDialogType.Normal, isDismissible: false, showLogs: false);
dialog.style(
messageTextStyle:
TextWidgetComposer.montserratStyle(fontSize: 16.0, fontColor: Colors.black, fontWeight: FontWeight.w600),
backgroundColor: Colors.white,
progressWidget: ImageWidgetComposer.myCustomLoaderAnimatedImage(),
insetAnimCurve: Curves.decelerate,
);
return dialog;
}
fayaz07 commented
Hi @robert-sperse ,
One thing I can suggest you is, create a widget(as the dialog you wrote in your code) and embed it as a loader widget while configuring the OTS widget
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return OTS(
showNetworkUpdates: true,
persistNoInternetNotification: false,
bottomInternetNotificationPadding: 16.0,
/// pass your custom loader here
loader: CustomWidget(),
// child: MaterialApp(
// title: 'OTS Test',
// home: Home(),
// ),
child: CupertinoApp(
title: 'OTS Test',
home: Home(),
),
);
}
}
fayaz07 commented
Assuming the snippet was helpful and closing this. Feel free to re-open