Skip to content

Commit c456916

Browse files
committed
code migration to flutter 2.0
1 parent 35c0667 commit c456916

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+288
-207
lines changed

lib/screens/accordion/accordion.dart

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import 'package:flutter/material.dart';
2-
import 'package:getwidget/getwidget.dart';
32
import 'package:gf_web/screens/layout/layout.dart';
43
import 'package:gf_web/styles/styles.dart';
4+
import 'package:getwidget/getwidget.dart';
5+
56

67
class Accordion extends StatefulWidget {
78
@override
@@ -30,7 +31,7 @@ class _AccordionState extends State<Accordion> {
3031
SizedBox(
3132
height: 30,
3233
),
33-
const Padding(
34+
Padding(
3435
padding: EdgeInsets.only(left: 15, top: 30),
3536
child: GFTypography(
3637
child: Text(
@@ -43,7 +44,7 @@ class _AccordionState extends State<Accordion> {
4344
),
4445
type: GFTypographyType.typo5,
4546
dividerWidth: 45,
46-
dividerColor: Color(0xFF19CA4B),
47+
dividerColor: Color(0xFF19CA4B), text: '',
4748
),
4849
),
4950
SizedBox(
@@ -87,7 +88,7 @@ class _AccordionState extends State<Accordion> {
8788
),
8889
type: GFTypographyType.typo5,
8990
dividerWidth: 45,
90-
dividerColor: Color(0xFF19CA4B),
91+
dividerColor: Color(0xFF19CA4B), text: '',
9192
),
9293
),
9394
SizedBox(
@@ -136,7 +137,7 @@ class _AccordionState extends State<Accordion> {
136137
),
137138
type: GFTypographyType.typo5,
138139
dividerWidth: 45,
139-
dividerColor: Color(0xFF19CA4B),
140+
dividerColor: Color(0xFF19CA4B), text: '',
140141
),
141142
),
142143
SizedBox(

lib/screens/alert/alert.dart

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class Alert extends StatefulWidget {
1010

1111
class _AlertState extends State<Alert> {
1212
bool showblur = false;
13-
Widget alertWidget;
13+
Widget? alertWidget;
1414
@override
1515
Widget build(BuildContext context) {
1616
return Scaffold(
@@ -49,7 +49,7 @@ class _AlertState extends State<Alert> {
4949
),
5050
type: GFTypographyType.typo5,
5151
dividerWidth: 45,
52-
dividerColor: Color(0xFF19CA4B),
52+
dividerColor: Color(0xFF19CA4B), text: '',
5353
),
5454
),
5555
Container(
@@ -123,7 +123,7 @@ class _AlertState extends State<Alert> {
123123
),
124124
type: GFTypographyType.typo5,
125125
dividerWidth: 45,
126-
dividerColor: Color(0xFF19CA4B),
126+
dividerColor: Color(0xFF19CA4B), text: '',
127127
),
128128
),
129129
Container(
@@ -195,7 +195,7 @@ class _AlertState extends State<Alert> {
195195
),
196196
type: GFTypographyType.typo5,
197197
dividerWidth: 45,
198-
dividerColor: Color(0xFF19CA4B),
198+
dividerColor: Color(0xFF19CA4B), text: '',
199199
),
200200
),
201201
Container(

lib/screens/animation/animation.dart

+12-12
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class _AnimationState extends State<Animation>
1414
bool selected = false;
1515
bool _large = false;
1616
double _size = 50.0;
17-
AnimationController controller;
17+
AnimationController? controller;
1818
bool _first = true;
1919
double _fontSize = 30;
2020
Color _color = GFColors.SUCCESS;
@@ -24,12 +24,12 @@ class _AnimationState extends State<Animation>
2424
super.initState();
2525
controller =
2626
AnimationController(duration: const Duration(seconds: 2), vsync: this);
27-
controller.repeat();
27+
controller!.repeat();
2828
}
2929

3030
@override
3131
void dispose() {
32-
if (controller != null) controller.dispose();
32+
if (controller != null) controller!.dispose();
3333
super.dispose();
3434
}
3535

@@ -72,12 +72,12 @@ class _AnimationState extends State<Animation>
7272
),
7373
type: GFTypographyType.typo5,
7474
dividerWidth: 45,
75-
dividerColor: Color(0xFF19CA4B),
75+
dividerColor: Color(0xFF19CA4B), text: '',
7676
),
7777
),
7878
GestureDetector(
7979
onTap: () {
80-
controller.repeat();
80+
controller!.repeat();
8181
},
8282
child: GFAnimation(
8383
controller: controller,
@@ -105,12 +105,12 @@ class _AnimationState extends State<Animation>
105105
),
106106
type: GFTypographyType.typo5,
107107
dividerWidth: 45,
108-
dividerColor: Color(0xFF19CA4B),
108+
dividerColor: Color(0xFF19CA4B), text: '',
109109
),
110110
),
111111
GestureDetector(
112112
onTap: () {
113-
controller.repeat();
113+
controller!.repeat();
114114
},
115115
child: GFAnimation(
116116
controller: controller,
@@ -137,7 +137,7 @@ class _AnimationState extends State<Animation>
137137
),
138138
type: GFTypographyType.typo5,
139139
dividerWidth: 45,
140-
dividerColor: Color(0xFF19CA4B),
140+
dividerColor: Color(0xFF19CA4B), text: '',
141141
),
142142
),
143143
GFAnimation(
@@ -165,7 +165,7 @@ class _AnimationState extends State<Animation>
165165
),
166166
type: GFTypographyType.typo5,
167167
dividerWidth: 45,
168-
dividerColor: Color(0xFF19CA4B),
168+
dividerColor: Color(0xFF19CA4B), text: '',
169169
),
170170
),
171171
Container(
@@ -194,7 +194,7 @@ class _AnimationState extends State<Animation>
194194
),
195195
type: GFTypographyType.typo5,
196196
dividerWidth: 45,
197-
dividerColor: Color(0xFF19CA4B),
197+
dividerColor: Color(0xFF19CA4B), text: '',
198198
),
199199
),
200200
GFAnimation(
@@ -228,7 +228,7 @@ class _AnimationState extends State<Animation>
228228
),
229229
type: GFTypographyType.typo5,
230230
dividerWidth: 45,
231-
dividerColor: Color(0xFF19CA4B),
231+
dividerColor: Color(0xFF19CA4B), text: '',
232232
),
233233
),
234234
GFAnimation(
@@ -259,7 +259,7 @@ class _AnimationState extends State<Animation>
259259
),
260260
type: GFTypographyType.typo5,
261261
dividerWidth: 45,
262-
dividerColor: Color(0xFF19CA4B),
262+
dividerColor: Color(0xFF19CA4B), text: '',
263263
),
264264
),
265265
GFAnimation(

lib/screens/appbar/appbar.dart

+3-3
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class _AppBarState extends State<AppBar> {
4646
),
4747
type: GFTypographyType.typo5,
4848
dividerWidth: 45,
49-
dividerColor: Color(0xFF19CA4B),
49+
dividerColor: Color(0xFF19CA4B), text: '',
5050
),
5151
),
5252
SizedBox(
@@ -69,7 +69,7 @@ class _AppBarState extends State<AppBar> {
6969
),
7070
type: GFTypographyType.typo5,
7171
dividerWidth: 45,
72-
dividerColor: Color(0xFF19CA4B),
72+
dividerColor: Color(0xFF19CA4B), text: '',
7373
),
7474
),
7575
SizedBox(
@@ -92,7 +92,7 @@ class _AppBarState extends State<AppBar> {
9292
),
9393
type: GFTypographyType.typo5,
9494
dividerWidth: 45,
95-
dividerColor: Color(0xFF19CA4B),
95+
dividerColor: Color(0xFF19CA4B), text: '',
9696
),
9797
),
9898
SizedBox(

lib/screens/appbar/segmented.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class SegmentedAppbar extends StatefulWidget {
88

99
class _SegmentedAppbarState extends State<SegmentedAppbar>
1010
with TickerProviderStateMixin {
11-
TabController tabController;
11+
TabController? tabController;
1212
@override
1313
void initState() {
1414
super.initState();
@@ -17,7 +17,7 @@ class _SegmentedAppbarState extends State<SegmentedAppbar>
1717

1818
@override
1919
void dispose() {
20-
tabController.dispose();
20+
tabController!.dispose();
2121
super.dispose();
2222
}
2323

lib/screens/avatar/avatar.dart

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ class _AvatarState extends State<Avatar> {
2222
type: GFTypographyType.typo5,
2323
dividerWidth: 50,
2424
dividerColor: Color(0xFF19CA4B),
25+
text: '',
2526
child: Text(
2627
'Avatar',
2728
style: hintStyleTextblackbold(),

lib/screens/badges/badges.dart

+2
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ class _BadgesState extends State<Badges> {
3838
type: GFTypographyType.typo5,
3939
dividerWidth: 50,
4040
dividerColor: Color(0xFF19CA4B),
41+
text: '',
4142
child: Text(
4243
'With Buttons',
4344
style: hintStyleTextblackbold(),
@@ -166,6 +167,7 @@ class _BadgesState extends State<Badges> {
166167
type: GFTypographyType.typo5,
167168
dividerWidth: 50,
168169
dividerColor: Color(0xFF19CA4B),
170+
text: '',
169171
child: Text(
170172
'Icon with Badges',
171173
style: hintStyleTextblackbold(),

lib/screens/border/dashedborder.dart

+4-4
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class _DashedBorderState extends State<DashedBorder> {
4343
),
4444
type: GFTypographyType.typo5,
4545
dividerWidth: 45,
46-
dividerColor: Color(0xFF19CA4B),
46+
dividerColor: Color(0xFF19CA4B), text: '',
4747
),
4848
),
4949
Container(
@@ -84,7 +84,7 @@ class _DashedBorderState extends State<DashedBorder> {
8484
),
8585
type: GFTypographyType.typo5,
8686
dividerWidth: 45,
87-
dividerColor: Color(0xFF19CA4B),
87+
dividerColor: Color(0xFF19CA4B), text: '',
8888
),
8989
),
9090
Container(
@@ -122,7 +122,7 @@ class _DashedBorderState extends State<DashedBorder> {
122122
backgroundImage: AssetImage('lib/assets/images/img.png'),
123123
),
124124
titleText: 'Card Title',
125-
subtitleText: 'Sub Title',
125+
subTitleText: 'Sub Title',
126126
icon: GFIconButton(
127127
onPressed: null,
128128
icon: GestureDetector(
@@ -161,7 +161,7 @@ class _DashedBorderState extends State<DashedBorder> {
161161
),
162162
type: GFTypographyType.typo5,
163163
dividerWidth: 45,
164-
dividerColor: Color(0xFF19CA4B),
164+
dividerColor: Color(0xFF19CA4B), text: '',
165165
),
166166
),
167167
Row(

lib/screens/border/dottedborder.dart

+4-4
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class _DottedBorderState extends State<DottedBorder> {
4343
),
4444
type: GFTypographyType.typo5,
4545
dividerWidth: 45,
46-
dividerColor: Color(0xFF19CA4B),
46+
dividerColor: Color(0xFF19CA4B), text: '',
4747
),
4848
),
4949
Container(
@@ -84,7 +84,7 @@ class _DottedBorderState extends State<DottedBorder> {
8484
),
8585
type: GFTypographyType.typo5,
8686
dividerWidth: 45,
87-
dividerColor: Color(0xFF19CA4B),
87+
dividerColor: Color(0xFF19CA4B), text: '',
8888
),
8989
),
9090
Container(
@@ -119,7 +119,7 @@ class _DottedBorderState extends State<DottedBorder> {
119119
style: TextStyle(
120120
color: Colors.grey, fontWeight: FontWeight.w500),
121121
),
122-
subtitle: Text(
122+
subTitle: Text(
123123
'subtitle',
124124
style: TextStyle(color: Colors.grey),
125125
),
@@ -158,7 +158,7 @@ class _DottedBorderState extends State<DottedBorder> {
158158
),
159159
type: GFTypographyType.typo5,
160160
dividerWidth: 45,
161-
dividerColor: Color(0xFF19CA4B),
161+
dividerColor: Color(0xFF19CA4B), text: '',
162162
),
163163
),
164164
Row(

lib/screens/border/solidborder.dart

+3-3
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class _SolidBorderState extends State<SolidBorder> {
4343
),
4444
type: GFTypographyType.typo5,
4545
dividerWidth: 45,
46-
dividerColor: Color(0xFF19CA4B),
46+
dividerColor: Color(0xFF19CA4B), text: '',
4747
),
4848
),
4949
Container(
@@ -84,7 +84,7 @@ class _SolidBorderState extends State<SolidBorder> {
8484
),
8585
type: GFTypographyType.typo5,
8686
dividerWidth: 45,
87-
dividerColor: Color(0xFF19CA4B),
87+
dividerColor: Color(0xFF19CA4B), text: '',
8888
),
8989
),
9090
Container(
@@ -151,7 +151,7 @@ class _SolidBorderState extends State<SolidBorder> {
151151
),
152152
type: GFTypographyType.typo5,
153153
dividerWidth: 45,
154-
dividerColor: Color(0xFF19CA4B),
154+
dividerColor: Color(0xFF19CA4B), text: '',
155155
),
156156
),
157157
Row(

lib/screens/bottomsheet/bottomsheet.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class _BottomSheetState extends State<BottomSheet> {
2828
backgroundImage: AssetImage('lib/assets/images/img.png'),
2929
),
3030
titleText: 'Eva Mendez',
31-
subtitleText: '11 minutes ago',
31+
subTitleText: '11 minutes ago',
3232
),
3333
),
3434
contentBody: SingleChildScrollView(
@@ -72,7 +72,7 @@ class _BottomSheetState extends State<BottomSheet> {
7272
AssetImage('lib/assets/images/img2.png'),
7373
size: 20,
7474
),
75-
subtitleText: 'John Mendez',
75+
subTitleText: 'John Mendez',
7676
icon: Container(
7777
width: 66,
7878
height: 30,

0 commit comments

Comments
 (0)