Skip to content

Commit de9d8bf

Browse files
authored
Merge pull request #28 from Ascenio/master
fix: removes most warnings
2 parents a2ca272 + 862508a commit de9d8bf

File tree

13 files changed

+32
-25
lines changed

13 files changed

+32
-25
lines changed

lib/animations/menu_exploration/menu_exploration.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class MenuExploration extends StatefulWidget {
1818
this.height,
1919
this.onChanged,
2020
this.selectedValue,
21-
}) : assert(options != null && options.isNotEmpty),
21+
}) : assert(options.isNotEmpty),
2222
super(key: key);
2323

2424
@override

lib/app_clone/movies_concept/movies_concept_page.dart

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,10 @@ class _MoviesConceptPageState extends State<MoviesConceptPage> {
184184
left: size.width / 4,
185185
bottom: 20,
186186
width: size.width / 2,
187-
child: RaisedButton(
188-
color: Colors.black,
187+
child: ElevatedButton(
188+
style: ElevatedButton.styleFrom(
189+
primary: Colors.black,
190+
),
189191
child: Text(
190192
'BUY TICKET',
191193
style: TextStyle(color: Colors.white),

lib/app_clone/photo_concept/photo_concept_page.dart

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -216,10 +216,12 @@ class _PhotoConceptPageState extends State<PhotoConceptPage> {
216216
duration: duration),
217217
Padding(
218218
padding: const EdgeInsets.all(12.0),
219-
child: RaisedButton(
220-
color: Colors.redAccent,
221-
shape: RoundedRectangleBorder(
222-
borderRadius: BorderRadius.circular(20.0),
219+
child: ElevatedButton(
220+
style: ElevatedButton.styleFrom(
221+
primary: Colors.redAccent,
222+
shape: RoundedRectangleBorder(
223+
borderRadius: BorderRadius.circular(20.0),
224+
),
223225
),
224226
onPressed: () {},
225227
child: Padding(

lib/app_clone/sports_store/sports_store_page.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ class _SportsStorePageState extends State<SportsStorePage> {
305305
child: Row(
306306
children: [
307307
Expanded(
308-
child: OutlineButton(
308+
child: OutlinedButton(
309309
onPressed: null,
310310
child: Text(
311311
'3',
@@ -317,7 +317,7 @@ class _SportsStorePageState extends State<SportsStorePage> {
317317
width: 10,
318318
),
319319
Expanded(
320-
child: OutlineButton(
320+
child: OutlinedButton(
321321
onPressed: null,
322322
child: Text(
323323
'4',
@@ -329,7 +329,7 @@ class _SportsStorePageState extends State<SportsStorePage> {
329329
width: 10,
330330
),
331331
Expanded(
332-
child: OutlineButton(
332+
child: OutlinedButton(
333333
onPressed: null,
334334
child: Text(
335335
'5',

lib/appbar_sliverappbar/sample3.dart

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,13 +147,16 @@ class AlbumWidget extends StatelessWidget {
147147
color: Colors.white,
148148
),
149149
),
150-
RaisedButton(
150+
ElevatedButton(
151+
style: ElevatedButton.styleFrom(
152+
primary: Colors.pinkAccent,
151153
shape: RoundedRectangleBorder(
152154
borderRadius: BorderRadius.circular(25),
153155
),
154-
color: Colors.pinkAccent,
155-
child: Text('ADD TO PLAYLIST'),
156-
onPressed: () => null)
156+
),
157+
child: Text('ADD TO PLAYLIST'),
158+
onPressed: () => null,
159+
)
157160
],
158161
),
159162
),

lib/communication_widgets/child1_page.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,21 +30,21 @@ class Child1PageState extends State<Child1Page> {
3030
widget.title ?? value,
3131
style: Theme.of(context).primaryTextTheme.headline5,
3232
),
33-
RaisedButton(
33+
ElevatedButton(
3434
//Update Parent from Child 1
3535
child: Text("Action 2"),
3636
onPressed: () {
3737
widget.child2Action2!("Update from Child 1");
3838
},
3939
),
40-
RaisedButton(
40+
ElevatedButton(
4141
//Update Child 2 from Child 1
4242
child: Text("Action 3"),
4343
onPressed: () {
4444
widget.child2Action3!("Update from Child 1");
4545
},
4646
),
47-
RaisedButton(
47+
ElevatedButton(
4848
//Change Tab from Child 1 to Child 2
4949
child: Text("Action 4"),
5050
onPressed: () {

lib/communication_widgets/parent_page.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ class ParentPageState extends State<ParentPage>
7474
textAlign: TextAlign.center,
7575
),
7676
),
77-
RaisedButton(
77+
ElevatedButton(
7878
//Update Child 1 from Parent
7979
child: Text("Action 1"),
8080
onPressed: () {

lib/fetch_data/main_fetch_data.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class _MainFetchDataState extends State<MainFetchData> {
3939
),
4040
bottomNavigationBar: Padding(
4141
padding: const EdgeInsets.all(8.0),
42-
child: RaisedButton(
42+
child: ElevatedButton(
4343
child: Text("Fetch Data"),
4444
onPressed: _fetchData,
4545
),

lib/hero_animations/main_hero_animations.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ class _MainHeroAnimationsPageState extends State<MainHeroAnimationsPage> {
121121
)),
122122
),
123123
actions: <Widget>[
124-
OutlineButton(
124+
OutlinedButton(
125125
onPressed: () => Navigator.of(context).pop(),
126126
child: Icon(Icons.close),
127127
),

lib/hero_animations/page1.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class Page1 extends StatelessWidget {
2020
),
2121
),
2222
),
23-
OutlineButton(
23+
OutlinedButton(
2424
onPressed: () => Navigator.of(context).pop(),
2525
child: Icon(Icons.close),
2626
)

0 commit comments

Comments
 (0)