mirror of
https://github.com/flutter/samples.git
synced 2025-11-08 22:09:06 +00:00
[linting_tool] Prepare for release (#880)
This commit is contained in:
committed by
GitHub
parent
0aad30fc5b
commit
410e43fbc1
@@ -7,11 +7,21 @@ import 'package:hive_flutter/hive_flutter.dart';
|
||||
import 'package:linting_tool/app.dart';
|
||||
import 'package:linting_tool/model/profile.dart';
|
||||
import 'package:linting_tool/model/rule.dart';
|
||||
import 'package:window_size/window_size.dart';
|
||||
|
||||
Future<void> main() async {
|
||||
/// Initiliaze Hive DB.
|
||||
await Hive.initFlutter();
|
||||
|
||||
/// Register adapters for [Rule] and [RulesProfile]
|
||||
/// so that their objects can be directly saved to the DB.
|
||||
Hive.registerAdapter(RuleAdapter());
|
||||
Hive.registerAdapter(RulesProfileAdapter());
|
||||
|
||||
/// Open a [LazyBox] to retrieve data from it
|
||||
await Hive.openLazyBox<RulesProfile>('rules_profile');
|
||||
|
||||
setWindowMinSize(const Size(600, 600));
|
||||
|
||||
runApp(const LintingTool());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user