Skip to content

Commit 02c5194

Browse files
committed
elevatedbutton
1 parent a43d6a9 commit 02c5194

File tree

2 files changed

+62
-45
lines changed

2 files changed

+62
-45
lines changed

lib/main.dart

+40-30
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import 'package:cloud_firestore/cloud_firestore.dart';
22
import 'package:firebase_core/firebase_core.dart';
3-
import 'package:flutter/cupertino.dart';
43
import 'package:flutter/material.dart';
54
import 'package:flutter_firebase_crud_app/widgets.dart';
65

@@ -165,55 +164,66 @@ class _MyAppState extends State<MyApp> {
165164
Row(
166165
children: [
167166
Expanded(
168-
// ignore: deprecated_member_use
169-
child: RaisedButton(
170-
padding: EdgeInsets.symmetric(vertical: 15.0),
171-
elevation: 8.0,
167+
child: ElevatedButton(
168+
style: ElevatedButton.styleFrom(
169+
padding: EdgeInsets.symmetric(vertical: 15.0),
170+
elevation: 8.0,
171+
backgroundColor: Colors.green,
172+
shape: raisedButtonBorder(),
173+
),
172174
onPressed: () => createData(),
173-
color: Colors.green,
174175
child: Text('Create',
175-
style: TextStyle(fontWeight: FontWeight.bold)),
176-
textColor: Colors.white,
177-
shape: raisedButtonBorder(),
176+
style: TextStyle(
177+
fontWeight: FontWeight.bold,
178+
color: Colors.white)),
178179
),
179180
),
180181
Expanded(
181182
// ignore: deprecated_member_use
182-
child: RaisedButton(
183-
padding: EdgeInsets.symmetric(vertical: 15.0),
184-
elevation: 8.0,
183+
child: ElevatedButton(
184+
style: ElevatedButton.styleFrom(
185+
padding: EdgeInsets.symmetric(vertical: 15.0),
186+
elevation: 8.0,
187+
backgroundColor: Colors.blue,
188+
shape: raisedButtonBorder(),
189+
),
185190
onPressed: () => readData(),
186-
color: Colors.blue,
187191
child: Text('Read',
188-
style: TextStyle(fontWeight: FontWeight.bold)),
189-
textColor: Colors.white,
190-
shape: raisedButtonBorder(),
192+
style: TextStyle(
193+
fontWeight: FontWeight.bold,
194+
color: Colors.white)),
191195
),
192196
),
193197
Expanded(
194198
// ignore: deprecated_member_use
195-
child: RaisedButton(
196-
padding: EdgeInsets.symmetric(vertical: 15.0),
197-
elevation: 8.0,
199+
child: ElevatedButton(
200+
style: ElevatedButton.styleFrom(
201+
padding: EdgeInsets.symmetric(vertical: 15.0),
202+
backgroundColor: Colors.orange,
203+
elevation: 8.0,
204+
shape: raisedButtonBorder(),
205+
),
198206
onPressed: () => updateData(),
199-
color: Colors.orange,
200207
child: Text('Update',
201-
style: TextStyle(fontWeight: FontWeight.bold)),
202-
textColor: Colors.white,
203-
shape: raisedButtonBorder(),
208+
style: TextStyle(
209+
fontWeight: FontWeight.bold,
210+
color: Colors.white)),
204211
),
205212
),
206213
Expanded(
207214
// ignore: deprecated_member_use
208-
child: RaisedButton(
209-
padding: EdgeInsets.symmetric(vertical: 15.0),
210-
elevation: 8.0,
215+
child: ElevatedButton(
216+
style: ElevatedButton.styleFrom(
217+
padding: EdgeInsets.symmetric(vertical: 15.0),
218+
elevation: 8.0,
219+
backgroundColor: Colors.red,
220+
shape: raisedButtonBorder(),
221+
),
211222
onPressed: () => deleteData(),
212-
color: Colors.red,
213223
child: Text('Delete',
214-
style: TextStyle(fontWeight: FontWeight.bold)),
215-
textColor: Colors.white,
216-
shape: raisedButtonBorder(),
224+
style: TextStyle(
225+
fontWeight: FontWeight.bold,
226+
color: Colors.white)),
217227
),
218228
),
219229
],

pubspec.lock

+22-15
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ packages:
77
name: async
88
url: "https://pub.dartlang.org"
99
source: hosted
10-
version: "2.6.0"
10+
version: "2.9.0"
1111
boolean_selector:
1212
dependency: transitive
1313
description:
@@ -21,7 +21,7 @@ packages:
2121
name: characters
2222
url: "https://pub.dartlang.org"
2323
source: hosted
24-
version: "1.1.0"
24+
version: "1.2.1"
2525
charcode:
2626
dependency: transitive
2727
description:
@@ -35,7 +35,7 @@ packages:
3535
name: clock
3636
url: "https://pub.dartlang.org"
3737
source: hosted
38-
version: "1.1.0"
38+
version: "1.1.1"
3939
cloud_firestore:
4040
dependency: "direct main"
4141
description:
@@ -63,7 +63,7 @@ packages:
6363
name: collection
6464
url: "https://pub.dartlang.org"
6565
source: hosted
66-
version: "1.15.0"
66+
version: "1.16.0"
6767
cupertino_icons:
6868
dependency: "direct main"
6969
description:
@@ -77,7 +77,7 @@ packages:
7777
name: fake_async
7878
url: "https://pub.dartlang.org"
7979
source: hosted
80-
version: "1.2.0"
80+
version: "1.3.1"
8181
firebase_auth:
8282
dependency: "direct main"
8383
description:
@@ -155,28 +155,35 @@ packages:
155155
name: js
156156
url: "https://pub.dartlang.org"
157157
source: hosted
158-
version: "0.6.3"
158+
version: "0.6.4"
159159
matcher:
160160
dependency: transitive
161161
description:
162162
name: matcher
163163
url: "https://pub.dartlang.org"
164164
source: hosted
165-
version: "0.12.10"
165+
version: "0.12.12"
166+
material_color_utilities:
167+
dependency: transitive
168+
description:
169+
name: material_color_utilities
170+
url: "https://pub.dartlang.org"
171+
source: hosted
172+
version: "0.1.5"
166173
meta:
167174
dependency: transitive
168175
description:
169176
name: meta
170177
url: "https://pub.dartlang.org"
171178
source: hosted
172-
version: "1.3.0"
179+
version: "1.8.0"
173180
path:
174181
dependency: transitive
175182
description:
176183
name: path
177184
url: "https://pub.dartlang.org"
178185
source: hosted
179-
version: "1.8.0"
186+
version: "1.8.2"
180187
plugin_platform_interface:
181188
dependency: transitive
182189
description:
@@ -202,7 +209,7 @@ packages:
202209
name: source_span
203210
url: "https://pub.dartlang.org"
204211
source: hosted
205-
version: "1.8.1"
212+
version: "1.9.0"
206213
stack_trace:
207214
dependency: transitive
208215
description:
@@ -223,21 +230,21 @@ packages:
223230
name: string_scanner
224231
url: "https://pub.dartlang.org"
225232
source: hosted
226-
version: "1.1.0"
233+
version: "1.1.1"
227234
term_glyph:
228235
dependency: transitive
229236
description:
230237
name: term_glyph
231238
url: "https://pub.dartlang.org"
232239
source: hosted
233-
version: "1.2.0"
240+
version: "1.2.1"
234241
test_api:
235242
dependency: transitive
236243
description:
237244
name: test_api
238245
url: "https://pub.dartlang.org"
239246
source: hosted
240-
version: "0.3.0"
247+
version: "0.4.12"
241248
typed_data:
242249
dependency: transitive
243250
description:
@@ -251,7 +258,7 @@ packages:
251258
name: vector_math
252259
url: "https://pub.dartlang.org"
253260
source: hosted
254-
version: "2.1.0"
261+
version: "2.1.2"
255262
sdks:
256-
dart: ">=2.12.0 <3.0.0"
263+
dart: ">=2.17.0-0 <3.0.0"
257264
flutter: ">=1.12.13+hotfix.5"

0 commit comments

Comments
 (0)