darty_commons 1.0.2 darty_commons: ^1.0.2 copied to clipboard
Darty Commons is a Package that provides a punch of useful extension methods for every application functionalities (Inspired by Anko Commons in Kotlin)
import 'package:flutter/material.dart';
import 'package:logging/logging.dart';
import 'test_widget.dart';
void main() {
runApp(MyApp());
Logger.root.level = Level.ALL; // defaults to Level.INFO
Logger.root.onRecord.listen((record) {
print('${record.level.name}: ${record.time}: ${record.message}');
});
}
class MyApp extends StatefulWidget {
MyApp();
@override
_MyAppState createState() => _MyAppState();
}
final GlobalKey<NavigatorState> mainNavigatorKey = GlobalKey<NavigatorState>();
class _MyAppState extends State<MyApp> {
@override
void initState() {
super.initState();
}
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
theme: ThemeData(
colorScheme:
ColorScheme.fromSwatch().copyWith(secondary: Colors.blue)),
home: TestWidget(),
);
}
}