-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.dart
More file actions
34 lines (29 loc) · 1.22 KB
/
main.dart
File metadata and controls
34 lines (29 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// -----------------------------------------------------------------------------
// b012_data — Full example entry point
//
// Each concern has its own self-contained, runnable file:
//
// * `sqlite_example.dart` — SQLite CRUD demo (auto-generated by
// `DataAccess.instance` around the `Person` entity).
// * `disc_example.dart` — File system / binary file demo
// (`DiscData.instance` around the `Images` entity).
//
// This `main.dart` simply orchestrates both demos in sequence. Run a single
// one with `flutter run -t example/sqlite_example.dart` or
// `flutter run -t example/disc_example.dart`.
// -----------------------------------------------------------------------------
import 'package:flutter/material.dart';
import 'disc_example.dart' as disc;
import 'sqlite_example.dart' as sqlite;
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
// 1. SQLite CRUD walk-through (Person entity).
await sqlite.runSqliteDemo();
// 2. File system / binary file walk-through (Images entity).
await disc.runDiscDemo();
runApp(
const MaterialApp(
home: Scaffold(body: Center(child: Text('b012_data tests completed'))),
),
);
}