1
1
import 'package:cloud_firestore/cloud_firestore.dart' ;
2
2
import 'package:flutter/material.dart' ;
3
+ import 'package:flutter_icons/flutter_icons.dart' ;
3
4
import 'package:get/get.dart' ;
5
+ import 'package:symptom_tracker/screens/fhir/fhir.dart' ;
6
+ import 'package:symptom_tracker/screens/fhir/firebase.dart' ;
7
+ import 'package:symptom_tracker/screens/fhir/sandbox.dart' ;
4
8
import 'package:symptom_tracker/services/services.dart' ;
5
9
6
10
import 'package:symptom_tracker/shared/shared.dart' ;
7
11
8
12
class FhirScreen extends StatelessWidget {
9
13
@override
10
14
Widget build (BuildContext context) {
11
- return Scaffold (
12
- appBar: SharedAppBar (
13
- title: 'FHIR' ,
15
+ return DefaultTabController (
16
+ length: 3 ,
17
+ child: Scaffold (
18
+ appBar: SharedAppBar (
19
+ title: 'FHIR' ,
20
+ ),
21
+ body: _buildBody (),
22
+ bottomNavigationBar: TabBar (tabs: [
23
+ Tab (icon: Icon (FlutterIcons .md_bonfire_ion), text: 'Sandbox' ),
24
+ Tab (icon: Icon (FlutterIcons .firebase_mco), text: 'Firebase' ),
25
+ Tab (icon: Icon (FlutterIcons .fire_mco), text: 'FHIR' ),
26
+ ]),
14
27
),
15
- body: _buildBody (),
16
28
);
17
29
}
18
30
@@ -22,9 +34,16 @@ class FhirScreen extends StatelessWidget {
22
34
children: < Widget > [
23
35
_firebaseStream (),
24
36
SizedBox (height: 24 ),
25
- Text ('Obligatory FHIR Puns:' , style: Get .theme.textTheme.headline4),
26
- SizedBox (height: 24 ),
27
- _sandbox (),
37
+ Expanded (
38
+ child: Container (
39
+ color: Get .theme.unselectedWidgetColor,
40
+ child: TabBarView (children: [
41
+ SandboxView (),
42
+ FirebaseView (),
43
+ FhirView (),
44
+ ]),
45
+ ),
46
+ ),
28
47
],
29
48
),
30
49
);
@@ -50,19 +69,4 @@ class FhirScreen extends StatelessWidget {
50
69
),
51
70
);
52
71
}
53
-
54
- Widget _sandbox () {
55
- return Expanded (
56
- child: ListView (
57
- children: < Widget > [
58
- Text ('text' , textAlign: TextAlign .center),
59
- Text ('text' , textAlign: TextAlign .center),
60
- Text ('text' , textAlign: TextAlign .center),
61
- Text ('text' , textAlign: TextAlign .center),
62
- Text ('text' , textAlign: TextAlign .center),
63
- Text ('text' , textAlign: TextAlign .center),
64
- ],
65
- ),
66
- );
67
- }
68
72
}
0 commit comments