@@ -44,15 +44,51 @@ class LearningApp extends StatelessWidget {
44
44
ChangeNotifierProvider (
45
45
create: (_) => LearningDigitalInkRecognitionState ()),
46
46
],
47
- child: LearningHomePage (),
47
+ child: LearningHome (),
48
48
),
49
49
);
50
50
}
51
51
}
52
52
53
- class LearningHomePage extends StatelessWidget {
53
+ class LearningHome extends StatefulWidget {
54
+ @override
55
+ _LearningHomeState createState () => _LearningHomeState ();
56
+ }
57
+
58
+ class _LearningHomeState extends State <LearningHome > {
59
+ Widget _menuItem (String text, Widget page) {
60
+ return ListTile (
61
+ title: Text (text),
62
+ onTap: () =>
63
+ Navigator .push (context, MaterialPageRoute (builder: (_) => page)),
64
+ );
65
+ }
66
+
54
67
@override
55
68
Widget build (BuildContext context) {
56
- return Container ();
69
+ return Scaffold (
70
+ appBar: AppBar (
71
+ centerTitle: true ,
72
+ title: Text ('Machine Learning Kit' ),
73
+ ),
74
+ body: SingleChildScrollView (
75
+ child: Column (
76
+ children: [
77
+ _menuItem ('Text Recognition' , LearningTextRecognition ()),
78
+ _menuItem ('Face Detection' , LearningFaceDetection ()),
79
+ _menuItem ('Pose Detection' , LearningPoseDetection ()),
80
+ _menuItem ('Selfie Segmentation' , LearningSelfieSegmentation ()),
81
+ _menuItem ('Barcode Scanning' , LearningBarcodeScanning ()),
82
+ _menuItem ('Image Labeling' , LearningImageLabeling ()),
83
+ _menuItem ('Object Detection & Tracking' , LearningObjectDetection ()),
84
+ //_menuItem('Digital Ink Recognition', LearningDigitalInkRecognition()),
85
+ _menuItem ('Language Detection' , LearningLanguage ()),
86
+ _menuItem ('On-device Translation' , LearningTranslate ()),
87
+ //_menuItem('Smart Reply', LearningSmartReply()),
88
+ _menuItem ('Entity Extraction' , LearningEntityExtraction ()),
89
+ ],
90
+ ),
91
+ ),
92
+ );
57
93
}
58
94
}
0 commit comments