Migrate isolate_example to Material 3 (#1619)

pull/1620/head
Miguel Beltran 3 years ago committed by GitHub
parent 51f0a74820
commit f3ec2b7e64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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

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

Loading…
Cancel
Save