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:
@@ -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'),
|
||||
),
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user