suga_core 1.2.0 suga_core: ^1.2.0 copied to clipboard
Suga Core Package.
import 'package:example/injector.dart';
import 'package:example/ui/count/count_page.dart';
import 'package:flutter/material.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
await setupInjector();
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
builder: (context, child) {
return FlutterEasyLoading(child: child);
},
theme: ThemeData(
primarySwatch: Colors.blue,
visualDensity: VisualDensity.adaptivePlatformDensity,
),
home: CountPage(),
);
}
}
void setupEasyLoading() {
EasyLoading.instance
..indicatorType = EasyLoadingIndicatorType.ring
..maskType = EasyLoadingMaskType.black
..loadingStyle = EasyLoadingStyle.custom
..backgroundColor = Colors.white
..indicatorColor = Colors.blue
..progressColor = Colors.blue
..userInteractions = false
..textColor = Colors.black;
}