@@ -15,75 +15,85 @@ class _MyAppState extends State<MyApp> {
15
15
Widget build (BuildContext context) {
16
16
return MaterialApp (
17
17
home: Scaffold (
18
- body: SurveyKit (
19
- onResult: (SurveyResult result) {
20
- print (result.finishReason);
21
- },
22
- task: getSampleTask (),
23
- themeData: Theme .of (context).copyWith (
24
- colorScheme: ColorScheme .fromSwatch (
25
- primarySwatch: Colors .cyan,
26
- ).copyWith (
27
- onPrimary: Colors .white,
28
- ),
29
- primaryColor: Colors .cyan,
30
- backgroundColor: Colors .white,
31
- appBarTheme: const AppBarTheme (
32
- color: Colors .white,
33
- iconTheme: IconThemeData (
34
- color: Colors .cyan,
35
- ),
36
- textTheme: TextTheme (
37
- button: TextStyle (
38
- color: Colors .cyan,
39
- ),
40
- ),
41
- ),
42
- iconTheme: const IconThemeData (
43
- color: Colors .cyan,
44
- ),
45
- outlinedButtonTheme: OutlinedButtonThemeData (
46
- style: ButtonStyle (
47
- minimumSize: MaterialStateProperty .all (
48
- Size (150.0 , 60.0 ),
49
- ),
50
- side: MaterialStateProperty .resolveWith (
51
- (Set <MaterialState > state) {
52
- if (state.contains (MaterialState .disabled)) {
53
- return BorderSide (
54
- color: Colors .grey,
55
- );
56
- }
57
- return BorderSide (
18
+ body: Container (
19
+ color: Colors .white,
20
+ child: Align (
21
+ alignment: Alignment .center,
22
+ child: Container (
23
+ height: double .infinity,
24
+ width: 600 ,
25
+ child: SurveyKit (
26
+ onResult: (SurveyResult result) {
27
+ print (result.finishReason);
28
+ },
29
+ task: getSampleTask (),
30
+ themeData: Theme .of (context).copyWith (
31
+ colorScheme: ColorScheme .fromSwatch (
32
+ primarySwatch: Colors .cyan,
33
+ ).copyWith (
34
+ onPrimary: Colors .white,
35
+ ),
36
+ primaryColor: Colors .cyan,
37
+ backgroundColor: Colors .white,
38
+ appBarTheme: const AppBarTheme (
39
+ color: Colors .white,
40
+ iconTheme: IconThemeData (
58
41
color: Colors .cyan,
59
- );
60
- },
61
- ),
62
- shape : MaterialStateProperty . all (
63
- RoundedRectangleBorder (
64
- borderRadius : BorderRadius . circular ( 8.0 ),
42
+ ),
43
+ textTheme : TextTheme (
44
+ button : TextStyle (
45
+ color : Colors .cyan,
46
+ ),
47
+ ),
65
48
),
66
- ),
67
- textStyle: MaterialStateProperty .resolveWith (
68
- (Set <MaterialState > state) {
69
- if (state.contains (MaterialState .disabled)) {
70
- return Theme .of (context).textTheme.button? .copyWith (
71
- color: Colors .grey,
49
+ iconTheme: const IconThemeData (
50
+ color: Colors .cyan,
51
+ ),
52
+ outlinedButtonTheme: OutlinedButtonThemeData (
53
+ style: ButtonStyle (
54
+ minimumSize: MaterialStateProperty .all (
55
+ Size (150.0 , 60.0 ),
56
+ ),
57
+ side: MaterialStateProperty .resolveWith (
58
+ (Set <MaterialState > state) {
59
+ if (state.contains (MaterialState .disabled)) {
60
+ return BorderSide (
61
+ color: Colors .grey,
62
+ );
63
+ }
64
+ return BorderSide (
65
+ color: Colors .cyan,
72
66
);
73
- }
74
- return Theme .of (context).textTheme.button? .copyWith (
75
- color: Colors .cyan,
76
- );
77
- },
78
- ),
79
- ),
80
- ),
81
- textButtonTheme: TextButtonThemeData (
82
- style: ButtonStyle (
83
- textStyle: MaterialStateProperty .all (
84
- Theme .of (context).textTheme.button? .copyWith (
85
- color: Colors .cyan,
67
+ },
86
68
),
69
+ shape: MaterialStateProperty .all (
70
+ RoundedRectangleBorder (
71
+ borderRadius: BorderRadius .circular (8.0 ),
72
+ ),
73
+ ),
74
+ textStyle: MaterialStateProperty .resolveWith (
75
+ (Set <MaterialState > state) {
76
+ if (state.contains (MaterialState .disabled)) {
77
+ return Theme .of (context).textTheme.button? .copyWith (
78
+ color: Colors .grey,
79
+ );
80
+ }
81
+ return Theme .of (context).textTheme.button? .copyWith (
82
+ color: Colors .cyan,
83
+ );
84
+ },
85
+ ),
86
+ ),
87
+ ),
88
+ textButtonTheme: TextButtonThemeData (
89
+ style: ButtonStyle (
90
+ textStyle: MaterialStateProperty .all (
91
+ Theme .of (context).textTheme.button? .copyWith (
92
+ color: Colors .cyan,
93
+ ),
94
+ ),
95
+ ),
96
+ ),
87
97
),
88
98
),
89
99
),
0 commit comments