Skip to content

Instantly share code, notes, and snippets.

@Sumit-Ghosh
Created January 16, 2022 09:47
Show Gist options
  • Save Sumit-Ghosh/1d04baeb859f52d80c8a405aed31e9e6 to your computer and use it in GitHub Desktop.
Save Sumit-Ghosh/1d04baeb859f52d80c8a405aed31e9e6 to your computer and use it in GitHub Desktop.
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
// Option 1
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: const NetworkHandler());
// Option 2
/*
return NetworkHandler(
child: MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: const CardWidget()),
);
*/
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment