Skip to content

Commit ffade37

Browse files
Migrate tfagents codelab to Material 3 (#1359)
* Migrate tfagents codelab to Material 3 * replaced ElevatedButton with FilledButton
1 parent d0f1156 commit ffade37

8 files changed

Lines changed: 16 additions & 8 deletions

File tree

tfagents-flutter/finished/frontend/lib/main.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ class _PlaneStrikeState extends State<PlaneStrike>
5252
title: 'TFAgents Flutter Sample App',
5353
theme: ThemeData(
5454
primarySwatch: Colors.blue,
55+
useMaterial3: true,
5556
),
5657
home: _buildGameBody(),
5758
);
@@ -207,7 +208,7 @@ class _PlaneStrikeState extends State<PlaneStrike>
207208
Padding(
208209
padding: const EdgeInsets.only(
209210
left: 0, top: 20, right: 0, bottom: 0),
210-
child: ElevatedButton(
211+
child: FilledButton(
211212
onPressed: () {
212213
_resetGame();
213214
setState(() {});

tfagents-flutter/step0/frontend/lib/main.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ class _PlaneStrikeState extends State<PlaneStrike>
5252
title: 'TFAgents Flutter Sample App',
5353
theme: ThemeData(
5454
primarySwatch: Colors.blue,
55+
useMaterial3: true,
5556
),
5657
home: _buildGameBody(),
5758
);
@@ -207,7 +208,7 @@ class _PlaneStrikeState extends State<PlaneStrike>
207208
Padding(
208209
padding: const EdgeInsets.only(
209210
left: 0, top: 20, right: 0, bottom: 0),
210-
child: ElevatedButton(
211+
child: FilledButton(
211212
onPressed: () {
212213
_resetGame();
213214
setState(() {});

tfagents-flutter/step1/frontend/lib/main.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ class _PlaneStrikeState extends State<PlaneStrike>
5252
title: 'TFAgents Flutter Sample App',
5353
theme: ThemeData(
5454
primarySwatch: Colors.blue,
55+
useMaterial3: true,
5556
),
5657
home: _buildGameBody(),
5758
);
@@ -207,7 +208,7 @@ class _PlaneStrikeState extends State<PlaneStrike>
207208
Padding(
208209
padding: const EdgeInsets.only(
209210
left: 0, top: 20, right: 0, bottom: 0),
210-
child: ElevatedButton(
211+
child: FilledButton(
211212
onPressed: () {
212213
_resetGame();
213214
setState(() {});

tfagents-flutter/step2/frontend/lib/main.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ class _PlaneStrikeState extends State<PlaneStrike>
5252
title: 'TFAgents Flutter Sample App',
5353
theme: ThemeData(
5454
primarySwatch: Colors.blue,
55+
useMaterial3: true,
5556
),
5657
home: _buildGameBody(),
5758
);
@@ -207,7 +208,7 @@ class _PlaneStrikeState extends State<PlaneStrike>
207208
Padding(
208209
padding: const EdgeInsets.only(
209210
left: 0, top: 20, right: 0, bottom: 0),
210-
child: ElevatedButton(
211+
child: FilledButton(
211212
onPressed: () {
212213
_resetGame();
213214
setState(() {});

tfagents-flutter/step3/frontend/lib/main.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ class _PlaneStrikeState extends State<PlaneStrike>
5252
title: 'TFAgents Flutter Sample App',
5353
theme: ThemeData(
5454
primarySwatch: Colors.blue,
55+
useMaterial3: true,
5556
),
5657
home: _buildGameBody(),
5758
);
@@ -207,7 +208,7 @@ class _PlaneStrikeState extends State<PlaneStrike>
207208
Padding(
208209
padding: const EdgeInsets.only(
209210
left: 0, top: 20, right: 0, bottom: 0),
210-
child: ElevatedButton(
211+
child: FilledButton(
211212
onPressed: () {
212213
_resetGame();
213214
setState(() {});

tfagents-flutter/step4/frontend/lib/main.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ class _PlaneStrikeState extends State<PlaneStrike>
5252
title: 'TFAgents Flutter Sample App',
5353
theme: ThemeData(
5454
primarySwatch: Colors.blue,
55+
useMaterial3: true,
5556
),
5657
home: _buildGameBody(),
5758
);
@@ -207,7 +208,7 @@ class _PlaneStrikeState extends State<PlaneStrike>
207208
Padding(
208209
padding: const EdgeInsets.only(
209210
left: 0, top: 20, right: 0, bottom: 0),
210-
child: ElevatedButton(
211+
child: FilledButton(
211212
onPressed: () {
212213
_resetGame();
213214
setState(() {});

tfagents-flutter/step5/frontend/lib/main.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ class _PlaneStrikeState extends State<PlaneStrike>
5252
title: 'TFAgents Flutter Sample App',
5353
theme: ThemeData(
5454
primarySwatch: Colors.blue,
55+
useMaterial3: true,
5556
),
5657
home: _buildGameBody(),
5758
);
@@ -207,7 +208,7 @@ class _PlaneStrikeState extends State<PlaneStrike>
207208
Padding(
208209
padding: const EdgeInsets.only(
209210
left: 0, top: 20, right: 0, bottom: 0),
210-
child: ElevatedButton(
211+
child: FilledButton(
211212
onPressed: () {
212213
_resetGame();
213214
setState(() {});

tfagents-flutter/step6/frontend/lib/main.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ class _PlaneStrikeState extends State<PlaneStrike>
5252
title: 'TFAgents Flutter Sample App',
5353
theme: ThemeData(
5454
primarySwatch: Colors.blue,
55+
useMaterial3: true,
5556
),
5657
home: _buildGameBody(),
5758
);
@@ -207,7 +208,7 @@ class _PlaneStrikeState extends State<PlaneStrike>
207208
Padding(
208209
padding: const EdgeInsets.only(
209210
left: 0, top: 20, right: 0, bottom: 0),
210-
child: ElevatedButton(
211+
child: FilledButton(
211212
onPressed: () {
212213
_resetGame();
213214
setState(() {});

0 commit comments

Comments
 (0)