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

Flutter 3.29 beta (#2571)

This commit is contained in:
Eric Windmill
2025-02-12 18:08:01 -05:00
committed by GitHub
parent d62c784789
commit 719fd72c38
685 changed files with 76244 additions and 53721 deletions

View File

@@ -18,9 +18,7 @@ class PlatformView extends StatelessWidget {
Widget build(BuildContext context) {
return MaterialApp(
title: 'Platform View',
theme: ThemeData(
primarySwatch: Colors.grey,
),
theme: ThemeData(primarySwatch: Colors.grey),
home: const HomePage(),
);
}
@@ -34,23 +32,24 @@ class HomePage extends StatefulWidget {
}
class _HomePageState extends State<HomePage> {
static const MethodChannel _methodChannel =
MethodChannel('dev.flutter.sample/platform_view_swift');
static const MethodChannel _methodChannel = MethodChannel(
'dev.flutter.sample/platform_view_swift',
);
int _counter = 0;
Future<void> _launchPlatformCount() async {
final platformCounter =
await _methodChannel.invokeMethod<int>('switchView', _counter);
final platformCounter = await _methodChannel.invokeMethod<int>(
'switchView',
_counter,
);
setState(() => _counter = platformCounter ?? 0);
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('Home page'),
),
appBar: AppBar(title: const Text('Home page')),
body: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [

View File

@@ -4,7 +4,7 @@ description: A new Flutter project.
version: 1.0.0+1
environment:
sdk: ^3.5.0
sdk: ^3.7.0-0
dependencies:
flutter: