1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-08 22:09:06 +00:00

Enable Material 3 on federated_plugin (#1635)

* Enable Material 3 on federated_plugin

* update tests
This commit is contained in:
Miguel Beltran
2023-02-06 21:32:42 +01:00
committed by GitHub
parent 0f70826a71
commit 44f2356073
2 changed files with 5 additions and 4 deletions

View File

@@ -14,8 +14,9 @@ class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return const MaterialApp(
home: HomePage(),
return MaterialApp(
theme: ThemeData.light(useMaterial3: true),
home: const HomePage(),
);
}
}
@@ -49,7 +50,7 @@ class _HomePageState extends State<HomePage> {
style: Theme.of(context).textTheme.headlineSmall,
),
const SizedBox(height: 16),
ElevatedButton(
FilledButton(
onPressed: () async {
try {
final result = await getBatteryLevel();

View File

@@ -22,7 +22,7 @@ void main() {
await tester.pumpWidget(const MyApp());
// Tap button to retrieve current battery level from platform.
await tester.tap(find.byType(ElevatedButton));
await tester.tap(find.byType(FilledButton));
await tester.pumpAndSettle();
expect(find.text('Battery Level: $batteryLevel'), findsOneWidget);