1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-08 13:58:47 +00:00

Migrate isolate_example to Material 3 (#1619)

This commit is contained in:
Miguel Beltran
2023-02-01 15:03:18 +01:00
committed by GitHub
parent 51f0a74820
commit f3ec2b7e64
2 changed files with 4 additions and 3 deletions

View File

@@ -62,7 +62,7 @@ class DataTransferPage extends StatelessWidget {
style: ElevatedButton.styleFrom(
foregroundColor: (controller.runningTest == 1)
? Colors.blueAccent
: Colors.grey[300]),
: Colors.blueGrey),
onPressed: () => controller.generateRandomNumbers(false),
child: const Text('Transfer Data to 2nd Isolate'),
),
@@ -70,7 +70,7 @@ class DataTransferPage extends StatelessWidget {
style: ElevatedButton.styleFrom(
foregroundColor: (controller.runningTest == 2)
? Colors.blueAccent
: Colors.grey[300]),
: Colors.blueGrey),
onPressed: () => controller.generateRandomNumbers(true),
child: const Text('Transfer Data with TransferableTypedData'),
),
@@ -78,7 +78,7 @@ class DataTransferPage extends StatelessWidget {
style: ElevatedButton.styleFrom(
foregroundColor: (controller.runningTest == 3)
? Colors.blueAccent
: Colors.grey[300]),
: Colors.blueGrey),
onPressed: controller.generateOnSecondaryIsolate,
child: const Text('Generate on 2nd Isolate'),
),

View File

@@ -48,6 +48,7 @@ class HomePage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
theme: ThemeData.light(useMaterial3: true),
home: DefaultTabController(
length: 3,
child: Scaffold(