Add smoke tests for all the examples, fix 17 broken examples. (#89021)
This adds a smoke test for every single API example. It also fixes 17 tests that had bugs in them, or were otherwise broken, and even fixes one actual bug in the framework, and one limitation in the framework. The bug in the framework is that NetworkImage's _loadAsync method had await response.drain<List<int>>();, but if the response is null, it will throw a cryptic exception saying that Null can't be assigned to List<int>. The fix was just to use await response.drain<void>(); instead. The limitation is that RelativePositionedTransition takes an Animation<Rect> rect parameter, and if you want to use a RectTween with it, the value emitted there is Rect?, and one of the examples was just casting from Animation<Rect> to Animation<Rect?>, which is invalid, so I modified RelativePositionedTransition to take a Rect? and just use Rect.zero if the rect is null.
This commit is contained in:
@@ -47,7 +47,7 @@ android {
|
||||
|
||||
defaultConfig {
|
||||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
||||
applicationId "dev.flutter.dartpad_curve2_d_0"
|
||||
applicationId "dev.flutter.flutter_api_samples"
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 30
|
||||
versionCode flutterVersionCode.toInteger()
|
||||
|
||||
@@ -3,7 +3,7 @@ Use of this source code is governed by a BSD-style license that can be
|
||||
found in the LICENSE file. -->
|
||||
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="dev.flutter.dartpad_curve2_d_0">
|
||||
package="dev.flutter.flutter_api_samples">
|
||||
<!-- Flutter needs it to communicate with the running application
|
||||
to allow setting breakpoints, to provide hot reload, etc.
|
||||
-->
|
||||
|
||||
@@ -3,9 +3,9 @@ Use of this source code is governed by a BSD-style license that can be
|
||||
found in the LICENSE file. -->
|
||||
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="dev.flutter.dartpad_curve2_d_0">
|
||||
package="dev.flutter.flutter_api_samples">
|
||||
<application
|
||||
android:label="dartpad_curve2_d_0"
|
||||
android:label="flutter_api_samples"
|
||||
android:icon="@mipmap/ic_launcher">
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package dev.flutter.dartpad_curve2_d_0
|
||||
package dev.flutter.flutter_api_samples
|
||||
|
||||
import io.flutter.embedding.android.FlutterActivity
|
||||
|
||||
@@ -3,7 +3,7 @@ Use of this source code is governed by a BSD-style license that can be
|
||||
found in the LICENSE file. -->
|
||||
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="dev.flutter.dartpad_curve2_d_0">
|
||||
package="dev.flutter.flutter_api_samples">
|
||||
<!-- Flutter needs it to communicate with the running application
|
||||
to allow setting breakpoints, to provide hot reload, etc.
|
||||
-->
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
|
||||
#include "Generated.xcconfig"
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
|
||||
#include "Generated.xcconfig"
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>dartpad_curve2_d_0</string>
|
||||
<string>flutter_api_samples</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
|
||||
@@ -98,9 +98,9 @@ class _FollowCurve2DState extends State<FollowCurve2D>
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
super.dispose();
|
||||
// Always have to dispose of animation controllers when done.
|
||||
controller.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
@@ -64,32 +64,39 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return CupertinoApp(
|
||||
home: CupertinoPageScaffold(
|
||||
child: CustomScrollView(
|
||||
physics:
|
||||
const BouncingScrollPhysics(parent: AlwaysScrollableScrollPhysics()),
|
||||
slivers: <Widget>[
|
||||
const CupertinoSliverNavigationBar(largeTitle: Text('Scroll down')),
|
||||
CupertinoSliverRefreshControl(
|
||||
refreshTriggerPullDistance: 100.0,
|
||||
refreshIndicatorExtent: 60.0,
|
||||
onRefresh: () async {
|
||||
await Future<void>.delayed(const Duration(milliseconds: 1000));
|
||||
setState(() {
|
||||
items.insert(
|
||||
0, Container(color: colors[items.length % 3], height: 100.0));
|
||||
});
|
||||
},
|
||||
return CupertinoPageScaffold(
|
||||
child: CustomScrollView(
|
||||
physics: const BouncingScrollPhysics(
|
||||
parent: AlwaysScrollableScrollPhysics(),
|
||||
),
|
||||
SliverList(
|
||||
delegate: SliverChildBuilderDelegate(
|
||||
(BuildContext context, int index) => items[index],
|
||||
childCount: items.length,
|
||||
slivers: <Widget>[
|
||||
const CupertinoSliverNavigationBar(
|
||||
largeTitle: Text('Scroll down'),
|
||||
),
|
||||
),
|
||||
],
|
||||
)));
|
||||
CupertinoSliverRefreshControl(
|
||||
refreshTriggerPullDistance: 100.0,
|
||||
refreshIndicatorExtent: 60.0,
|
||||
onRefresh: () async {
|
||||
await Future<void>.delayed(
|
||||
const Duration(milliseconds: 1000),
|
||||
);
|
||||
setState(() {
|
||||
items.insert(
|
||||
0,
|
||||
Container(color: colors[items.length % 3], height: 100.0),
|
||||
);
|
||||
});
|
||||
},
|
||||
),
|
||||
SliverList(
|
||||
delegate: SliverChildBuilderDelegate(
|
||||
(BuildContext context, int index) => items[index],
|
||||
childCount: items.length,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
//* ▲▲▲▲▲▲▲▲ code ▲▲▲▲▲▲▲▲ (do not modify or remove section marker)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// Template: dev/snippets/config/templates/stateful_widget_material.tmpl
|
||||
// Template: dev/snippets/config/templates/stateful_widget_scaffold_center.tmpl
|
||||
//
|
||||
// Comment lines marked with "▼▼▼" and "▲▲▲" are used for authoring
|
||||
// of samples, and may be ignored if you are just exploring the sample.
|
||||
@@ -30,9 +30,14 @@ class MyApp extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return const MaterialApp(
|
||||
return MaterialApp(
|
||||
title: _title,
|
||||
home: MyStatefulWidget(),
|
||||
home: Scaffold(
|
||||
appBar: AppBar(title: const Text(_title)),
|
||||
body: const Center(
|
||||
child: MyStatefulWidget(),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// Template: dev/snippets/config/templates/stateless_widget_material.tmpl
|
||||
// Template: dev/snippets/config/templates/freeform.tmpl
|
||||
//
|
||||
// Comment lines marked with "▼▼▼" and "▲▲▲" are used for authoring
|
||||
// of samples, and may be ignored if you are just exploring the sample.
|
||||
@@ -12,12 +12,12 @@
|
||||
//***************************************************************************
|
||||
//* ▼▼▼▼▼▼▼▼ description ▼▼▼▼▼▼▼▼ (do not modify or remove section marker)
|
||||
|
||||
// This example shows how to use this animation to create a
|
||||
// [FloatingActionButton] that animates itself between the normal and
|
||||
// extended states of the [NavigationRail].
|
||||
// This example shows how to use this animation to create a [FloatingActionButton]
|
||||
// that animates itself between the normal and extended states of the
|
||||
// [NavigationRail].
|
||||
//
|
||||
// An instance of `ExtendableFab` would be created for
|
||||
// [NavigationRail.leading].
|
||||
// An instance of `MyNavigationRailFab` is created for [NavigationRail.leading].
|
||||
// Pressing the FAB button toggles the "extended" state of the [NavigationRail].
|
||||
|
||||
//* ▲▲▲▲▲▲▲▲ description ▲▲▲▲▲▲▲▲ (do not modify or remove section marker)
|
||||
//***************************************************************************
|
||||
@@ -32,34 +32,107 @@ import 'dart:ui';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
//********************************************************************************
|
||||
//* ▼▼▼▼▼▼▼▼ code-main ▼▼▼▼▼▼▼▼ (do not modify or remove section marker)
|
||||
|
||||
void main() => runApp(const MyApp());
|
||||
|
||||
/// This is the main application widget.
|
||||
//* ▲▲▲▲▲▲▲▲ code-main ▲▲▲▲▲▲▲▲ (do not modify or remove section marker)
|
||||
//********************************************************************************
|
||||
|
||||
//********************************************************************************
|
||||
//* ▼▼▼▼▼▼▼▼ code-preamble ▼▼▼▼▼▼▼▼ (do not modify or remove section marker)
|
||||
|
||||
class MyApp extends StatelessWidget {
|
||||
const MyApp({Key? key}) : super(key: key);
|
||||
|
||||
static const String _title = 'Flutter Code Sample';
|
||||
static const String _title = 'NavigationRail.extendedAnimation Sample';
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return const MaterialApp(
|
||||
return MaterialApp(
|
||||
title: _title,
|
||||
home: MyStatelessWidget(),
|
||||
home: Scaffold(
|
||||
appBar: AppBar(title: const Text(_title)),
|
||||
body: const MyNavigationRail(),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// This is the stateless widget that the main application instantiates.
|
||||
class MyStatelessWidget extends StatelessWidget {
|
||||
const MyStatelessWidget({Key? key}) : super(key: key);
|
||||
class MyNavigationRail extends StatefulWidget {
|
||||
const MyNavigationRail({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<MyNavigationRail> createState() => _MyNavigationRailState();
|
||||
}
|
||||
|
||||
class _MyNavigationRailState extends State<MyNavigationRail> {
|
||||
int _selectedIndex = 0;
|
||||
bool _extended = false;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Row(
|
||||
children: <Widget>[
|
||||
NavigationRail(
|
||||
selectedIndex: _selectedIndex,
|
||||
extended: _extended,
|
||||
leading: MyNavigationRailFab(onPressed: () {
|
||||
setState(() {
|
||||
_extended = !_extended;
|
||||
});
|
||||
}),
|
||||
onDestinationSelected: (int index) {
|
||||
setState(() {
|
||||
_selectedIndex = index;
|
||||
});
|
||||
},
|
||||
labelType: NavigationRailLabelType.none,
|
||||
destinations: const <NavigationRailDestination>[
|
||||
NavigationRailDestination(
|
||||
icon: Icon(Icons.favorite_border),
|
||||
selectedIcon: Icon(Icons.favorite),
|
||||
label: Text('First'),
|
||||
),
|
||||
NavigationRailDestination(
|
||||
icon: Icon(Icons.bookmark_border),
|
||||
selectedIcon: Icon(Icons.book),
|
||||
label: Text('Second'),
|
||||
),
|
||||
NavigationRailDestination(
|
||||
icon: Icon(Icons.star_border),
|
||||
selectedIcon: Icon(Icons.star),
|
||||
label: Text('Third'),
|
||||
),
|
||||
],
|
||||
),
|
||||
const VerticalDivider(thickness: 1, width: 1),
|
||||
// This is the main content.
|
||||
Expanded(
|
||||
child: Center(
|
||||
child: Text('selectedIndex: $_selectedIndex'),
|
||||
),
|
||||
)
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
//* ▲▲▲▲▲▲▲▲ code-preamble ▲▲▲▲▲▲▲▲ (do not modify or remove section marker)
|
||||
//********************************************************************************
|
||||
|
||||
//********************************************************************
|
||||
//* ▼▼▼▼▼▼▼▼ code ▼▼▼▼▼▼▼▼ (do not modify or remove section marker)
|
||||
|
||||
class MyNavigationRailFab extends StatelessWidget {
|
||||
const MyNavigationRailFab({Key? key, this.onPressed}) : super(key: key);
|
||||
|
||||
final VoidCallback? onPressed;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final Animation<double> animation =
|
||||
NavigationRail.extendedAnimation(context);
|
||||
final Animation<double> animation = NavigationRail.extendedAnimation(context);
|
||||
return AnimatedBuilder(
|
||||
animation: animation,
|
||||
builder: (BuildContext context, Widget? child) {
|
||||
@@ -72,7 +145,7 @@ class MyStatelessWidget extends StatelessWidget {
|
||||
child: animation.value == 0
|
||||
? FloatingActionButton(
|
||||
child: const Icon(Icons.add),
|
||||
onPressed: () {},
|
||||
onPressed: onPressed,
|
||||
)
|
||||
: Align(
|
||||
alignment: AlignmentDirectional.centerStart,
|
||||
@@ -82,7 +155,7 @@ class MyStatelessWidget extends StatelessWidget {
|
||||
child: FloatingActionButton.extended(
|
||||
icon: const Icon(Icons.add),
|
||||
label: const Text('CREATE'),
|
||||
onPressed: () {},
|
||||
onPressed: onPressed,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -90,8 +163,7 @@ class MyStatelessWidget extends StatelessWidget {
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
//* ▲▲▲▲▲▲▲▲ code ▲▲▲▲▲▲▲▲ (do not modify or remove section marker)
|
||||
//********************************************************************
|
||||
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// Template: dev/snippets/config/templates/stateful_widget_material.tmpl
|
||||
// Template: dev/snippets/config/templates/stateful_widget_scaffold_center.tmpl
|
||||
//
|
||||
// Comment lines marked with "▼▼▼" and "▲▲▲" are used for authoring
|
||||
// of samples, and may be ignored if you are just exploring the sample.
|
||||
@@ -29,9 +29,14 @@ class MyApp extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return const MaterialApp(
|
||||
return MaterialApp(
|
||||
title: _title,
|
||||
home: MyStatefulWidget(),
|
||||
home: Scaffold(
|
||||
appBar: AppBar(title: const Text(_title)),
|
||||
body: const Center(
|
||||
child: MyStatefulWidget(),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
//****************************************************************************
|
||||
//* ▼▼▼▼▼▼▼▼ code-imports ▼▼▼▼▼▼▼▼ (do not modify or remove section marker)
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/rendering.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
|
||||
@@ -33,15 +34,29 @@ import 'package:flutter/widgets.dart';
|
||||
|
||||
void main() {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
print(measureWidget(const SizedBox(width: 640, height: 480)));
|
||||
final Size size = measureWidget(const SizedBox(width: 640, height: 480));
|
||||
|
||||
// Just displays the size calculated above.
|
||||
runApp(
|
||||
WidgetsApp(
|
||||
title: 'BuildOwner Sample',
|
||||
color: const Color(0xff000000),
|
||||
builder: (BuildContext context, Widget? child) {
|
||||
return Scaffold(
|
||||
body: Center(
|
||||
child: Text(size.toString()),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Size measureWidget(Widget widget) {
|
||||
final PipelineOwner pipelineOwner = PipelineOwner();
|
||||
final MeasurementView rootView = pipelineOwner.rootNode = MeasurementView();
|
||||
final BuildOwner buildOwner = BuildOwner(focusManager: FocusManager());
|
||||
final RenderObjectToWidgetElement<RenderBox> element =
|
||||
RenderObjectToWidgetAdapter<RenderBox>(
|
||||
final RenderObjectToWidgetElement<RenderBox> element = RenderObjectToWidgetAdapter<RenderBox>(
|
||||
container: rootView,
|
||||
debugShortDescription: '[root]',
|
||||
child: widget,
|
||||
@@ -57,8 +72,7 @@ Size measureWidget(Widget widget) {
|
||||
}
|
||||
}
|
||||
|
||||
class MeasurementView extends RenderBox
|
||||
with RenderObjectWithChildMixin<RenderBox> {
|
||||
class MeasurementView extends RenderBox with RenderObjectWithChildMixin<RenderBox> {
|
||||
@override
|
||||
void performLayout() {
|
||||
assert(child != null);
|
||||
|
||||
@@ -12,45 +12,94 @@
|
||||
//***************************************************************************
|
||||
//* ▼▼▼▼▼▼▼▼ description ▼▼▼▼▼▼▼▼ (do not modify or remove section marker)
|
||||
|
||||
// This example shows how to override the standard error widget builder in release
|
||||
// mode, but use the standard one in debug mode.
|
||||
//
|
||||
// The error occurs when you click the "Error Prone" button.
|
||||
|
||||
//* ▲▲▲▲▲▲▲▲ description ▲▲▲▲▲▲▲▲ (do not modify or remove section marker)
|
||||
//***************************************************************************
|
||||
|
||||
//********************************************************************
|
||||
//* ▼▼▼▼▼▼▼▼ code ▼▼▼▼▼▼▼▼ (do not modify or remove section marker)
|
||||
//*************************************************************************
|
||||
//* ▼▼▼▼▼▼▼▼ code-imports ▼▼▼▼▼▼▼▼ (do not modify or remove section marker)
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
//* ▲▲▲▲▲▲▲▲ code-imports ▲▲▲▲▲▲▲▲ (do not modify or remove section marker)
|
||||
//*************************************************************************
|
||||
|
||||
//********************************************************************
|
||||
//* ▼▼▼▼▼▼▼▼ code ▼▼▼▼▼▼▼▼ (do not modify or remove section marker)
|
||||
|
||||
void main() {
|
||||
// Set the ErrorWidget's builder before the app is started.
|
||||
ErrorWidget.builder = (FlutterErrorDetails details) {
|
||||
// This is how to tell if you're in debug mode: Assertions are only executed in
|
||||
// debug mode.
|
||||
bool inDebug = false;
|
||||
assert(() {
|
||||
inDebug = true;
|
||||
return true;
|
||||
}());
|
||||
// In debug mode, use the normal error widget which shows
|
||||
// the error message:
|
||||
// If we're in debug mode, use the normal error widget which shows the error
|
||||
// message:
|
||||
if (inDebug) {
|
||||
return ErrorWidget(details.exception);
|
||||
}
|
||||
// In release builds, show a yellow-on-blue message instead:
|
||||
return Container(
|
||||
alignment: Alignment.center,
|
||||
child: const Text(
|
||||
'Error!',
|
||||
style: TextStyle(color: Colors.yellow),
|
||||
child: Text(
|
||||
'Error!\n${details.exception}',
|
||||
style: const TextStyle(color: Colors.yellow),
|
||||
textAlign: TextAlign.center,
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
);
|
||||
};
|
||||
// Here we would normally runApp() the root widget, but to demonstrate
|
||||
// the error handling we artificially fail:
|
||||
return runApp(Builder(
|
||||
builder: (BuildContext context) {
|
||||
throw 'oh no, an error';
|
||||
},
|
||||
));
|
||||
|
||||
// Start the app.
|
||||
runApp(const MyApp());
|
||||
}
|
||||
|
||||
class MyApp extends StatefulWidget {
|
||||
const MyApp({Key? key}) : super(key: key);
|
||||
|
||||
static const String _title = 'ErrorWidget Sample';
|
||||
|
||||
@override
|
||||
State<MyApp> createState() => _MyAppState();
|
||||
}
|
||||
|
||||
class _MyAppState extends State<MyApp> {
|
||||
bool throwError = false;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
if (throwError) {
|
||||
// Since the error widget is only used during a build, in this contrived example,
|
||||
// we purposely throw an exception in a build function.
|
||||
return Builder(
|
||||
builder: (BuildContext context) {
|
||||
throw Exception('oh no, an error');
|
||||
},
|
||||
);
|
||||
} else {
|
||||
return MaterialApp(
|
||||
title: MyApp._title,
|
||||
home: Scaffold(
|
||||
appBar: AppBar(title: const Text(MyApp._title)),
|
||||
body: Center(
|
||||
child: TextButton(
|
||||
onPressed: () {
|
||||
setState(() { throwError = true; });
|
||||
},
|
||||
child: const Text('Error Prone')),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//* ▲▲▲▲▲▲▲▲ code ▲▲▲▲▲▲▲▲ (do not modify or remove section marker)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// Template: dev/snippets/config/templates/stateless_widget_material.tmpl
|
||||
// Template: dev/snippets/config/templates/stateless_widget_scaffold_center.tmpl
|
||||
//
|
||||
// Comment lines marked with "▼▼▼" and "▲▲▲" are used for authoring
|
||||
// of samples, and may be ignored if you are just exploring the sample.
|
||||
@@ -38,9 +38,14 @@ class MyApp extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return const MaterialApp(
|
||||
return MaterialApp(
|
||||
title: _title,
|
||||
home: MyStatelessWidget(),
|
||||
home: Scaffold(
|
||||
appBar: AppBar(title: const Text(_title)),
|
||||
body: const Center(
|
||||
child: MyStatelessWidget(),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// Template: dev/snippets/config/templates/stateless_widget_material.tmpl
|
||||
// Template: dev/snippets/config/templates/stateless_widget_scaffold_center.tmpl
|
||||
//
|
||||
// Comment lines marked with "▼▼▼" and "▲▲▲" are used for authoring
|
||||
// of samples, and may be ignored if you are just exploring the sample.
|
||||
@@ -32,7 +32,11 @@ class MyApp extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return const MaterialApp(
|
||||
title: _title,
|
||||
home: MyStatelessWidget(),
|
||||
home: Scaffold(
|
||||
body: Center(
|
||||
child: MyStatelessWidget(),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ class MyStatelessWidget extends StatelessWidget {
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
),
|
||||
child: Image.network(
|
||||
'https://example.com/image.jpg',
|
||||
'https://flutter.github.io/assets-for-api-docs/assets/widgets/falcon.jpg',
|
||||
loadingBuilder: (BuildContext context, Widget child,
|
||||
ImageChunkEvent? loadingProgress) {
|
||||
if (loadingProgress == null) {
|
||||
|
||||
@@ -46,7 +46,7 @@ class IVBuilderExampleApp extends StatelessWidget {
|
||||
|
||||
class _IVBuilderExample extends StatefulWidget {
|
||||
@override
|
||||
_IVBuilderExampleState createState() => _IVBuilderExampleState();
|
||||
State<_IVBuilderExample> createState() => _IVBuilderExampleState();
|
||||
}
|
||||
|
||||
class _IVBuilderExampleState extends State<_IVBuilderExample> {
|
||||
@@ -58,7 +58,7 @@ class _IVBuilderExampleState extends State<_IVBuilderExample> {
|
||||
|
||||
// Returns true iff the given cell is currently visible. Caches viewport
|
||||
// calculations.
|
||||
late Quad _cachedViewport;
|
||||
Quad? _cachedViewport;
|
||||
late int _firstVisibleRow;
|
||||
late int _firstVisibleColumn;
|
||||
late int _lastVisibleRow;
|
||||
|
||||
@@ -1,69 +0,0 @@
|
||||
// Copyright 2014 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// Template: dev/snippets/config/templates/freeform.tmpl
|
||||
//
|
||||
// Comment lines marked with "▼▼▼" and "▲▲▲" are used for authoring
|
||||
// of samples, and may be ignored if you are just exploring the sample.
|
||||
|
||||
// Flutter code sample for TransitionDelegate
|
||||
//
|
||||
//***************************************************************************
|
||||
//* ▼▼▼▼▼▼▼▼ description ▼▼▼▼▼▼▼▼ (do not modify or remove section marker)
|
||||
|
||||
// The following example demonstrates how to implement a subclass that always
|
||||
// removes or adds routes without animated transitions and puts the removed
|
||||
// routes at the top of the list.
|
||||
|
||||
//* ▲▲▲▲▲▲▲▲ description ▲▲▲▲▲▲▲▲ (do not modify or remove section marker)
|
||||
//***************************************************************************
|
||||
|
||||
//****************************************************************************
|
||||
//* ▼▼▼▼▼▼▼▼ code-imports ▼▼▼▼▼▼▼▼ (do not modify or remove section marker)
|
||||
|
||||
import 'package:flutter/widgets.dart';
|
||||
|
||||
//* ▲▲▲▲▲▲▲▲ code-imports ▲▲▲▲▲▲▲▲ (do not modify or remove section marker)
|
||||
//****************************************************************************
|
||||
|
||||
//********************************************************************
|
||||
//* ▼▼▼▼▼▼▼▼ code ▼▼▼▼▼▼▼▼ (do not modify or remove section marker)
|
||||
|
||||
class NoAnimationTransitionDelegate extends TransitionDelegate<void> {
|
||||
@override
|
||||
Iterable<RouteTransitionRecord> resolve({
|
||||
required List<RouteTransitionRecord> newPageRouteHistory,
|
||||
required Map<RouteTransitionRecord?, RouteTransitionRecord>
|
||||
locationToExitingPageRoute,
|
||||
required Map<RouteTransitionRecord?, List<RouteTransitionRecord>>
|
||||
pageRouteToPagelessRoutes,
|
||||
}) {
|
||||
final List<RouteTransitionRecord> results = <RouteTransitionRecord>[];
|
||||
|
||||
for (final RouteTransitionRecord pageRoute in newPageRouteHistory) {
|
||||
if (pageRoute.isWaitingForEnteringDecision) {
|
||||
pageRoute.markForAdd();
|
||||
}
|
||||
results.add(pageRoute);
|
||||
}
|
||||
for (final RouteTransitionRecord exitingPageRoute
|
||||
in locationToExitingPageRoute.values) {
|
||||
if (exitingPageRoute.isWaitingForExitingDecision) {
|
||||
exitingPageRoute.markForRemove();
|
||||
final List<RouteTransitionRecord>? pagelessRoutes =
|
||||
pageRouteToPagelessRoutes[exitingPageRoute];
|
||||
if (pagelessRoutes != null) {
|
||||
for (final RouteTransitionRecord pagelessRoute in pagelessRoutes) {
|
||||
pagelessRoute.markForRemove();
|
||||
}
|
||||
}
|
||||
}
|
||||
results.add(exitingPageRoute);
|
||||
}
|
||||
return results;
|
||||
}
|
||||
}
|
||||
|
||||
//* ▲▲▲▲▲▲▲▲ code ▲▲▲▲▲▲▲▲ (do not modify or remove section marker)
|
||||
//********************************************************************
|
||||
@@ -29,10 +29,12 @@ class MyApp extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return WidgetsApp(
|
||||
title: 'Flutter Code Sample',
|
||||
home: const Center(
|
||||
child: MyStatefulWidget(restorationId: 'main'),
|
||||
),
|
||||
color: const Color(0xffffffff),
|
||||
builder: (BuildContext context, Widget? child) {
|
||||
return const Center(
|
||||
child: MyStatefulWidget(restorationId: 'main'),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget>
|
||||
).animate(CurvedAnimation(
|
||||
parent: _controller,
|
||||
curve: Curves.elasticInOut,
|
||||
)) as Animation<Rect>,
|
||||
)),
|
||||
child: const Padding(
|
||||
padding: EdgeInsets.all(8), child: FlutterLogo()),
|
||||
),
|
||||
|
||||
@@ -63,8 +63,8 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget>
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
super.dispose();
|
||||
_controller.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
@@ -64,8 +64,8 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget>
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
super.dispose();
|
||||
_controller.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
@@ -70,8 +70,8 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget>
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
super.dispose();
|
||||
_controller.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
@@ -78,6 +78,12 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget>
|
||||
controller.forward();
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
controller.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return CustomScrollView(slivers: <Widget>[
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
project(runner LANGUAGES CXX)
|
||||
|
||||
set(BINARY_NAME "dartpad_curve2_d_0")
|
||||
set(APPLICATION_ID "dev.flutter.dartpad_curve2_d_0")
|
||||
set(BINARY_NAME "flutter_api_samples")
|
||||
set(APPLICATION_ID "dev.flutter.flutter_api_samples")
|
||||
|
||||
cmake_policy(SET CMP0063 NEW)
|
||||
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
// Copyright 2014 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
//
|
||||
// Generated file. Do not edit.
|
||||
//
|
||||
|
||||
@@ -40,11 +40,11 @@ static void my_application_activate(GApplication* application) {
|
||||
if (use_header_bar) {
|
||||
GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new());
|
||||
gtk_widget_show(GTK_WIDGET(header_bar));
|
||||
gtk_header_bar_set_title(header_bar, "dartpad_curve2_d_0");
|
||||
gtk_header_bar_set_title(header_bar, "flutter_api_samples");
|
||||
gtk_header_bar_set_show_close_button(header_bar, TRUE);
|
||||
gtk_window_set_titlebar(window, GTK_WIDGET(header_bar));
|
||||
} else {
|
||||
gtk_window_set_title(window, "dartpad_curve2_d_0");
|
||||
gtk_window_set_title(window, "flutter_api_samples");
|
||||
}
|
||||
|
||||
gtk_window_set_default_size(window, 1280, 720);
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
|
||||
#include "ephemeral/Flutter-Generated.xcconfig"
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
|
||||
#include "ephemeral/Flutter-Generated.xcconfig"
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; };
|
||||
33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; };
|
||||
33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; };
|
||||
950C239DEA05231F26974A10 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 639541EE500E1E798CB69526 /* Pods_Runner.framework */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
@@ -52,9 +53,11 @@
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
277104DEA919A7BC0A865477 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
|
||||
29AD1BE7CDBB31470316D7C5 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = "<group>"; };
|
||||
335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = "<group>"; };
|
||||
33CC10ED2044A3C60003C045 /* dartpad_curve2_d_0.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "dartpad_curve2_d_0.app"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
33CC10ED2044A3C60003C045 /* flutter_api_samples.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = flutter_api_samples.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||
33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = "<group>"; };
|
||||
33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = "<group>"; };
|
||||
@@ -66,8 +69,10 @@
|
||||
33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = "<group>"; };
|
||||
33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = "<group>"; };
|
||||
33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = "<group>"; };
|
||||
639541EE500E1E798CB69526 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = "<group>"; };
|
||||
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = "<group>"; };
|
||||
E2F543B6F3F601B2108EAB46 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
@@ -75,12 +80,24 @@
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
950C239DEA05231F26974A10 /* Pods_Runner.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
02C0718F439899652B288987 /* Pods */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
29AD1BE7CDBB31470316D7C5 /* Pods-Runner.debug.xcconfig */,
|
||||
277104DEA919A7BC0A865477 /* Pods-Runner.release.xcconfig */,
|
||||
E2F543B6F3F601B2108EAB46 /* Pods-Runner.profile.xcconfig */,
|
||||
);
|
||||
name = Pods;
|
||||
path = Pods;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
33BA886A226E78AF003329D5 /* Configs */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -99,13 +116,14 @@
|
||||
33CEB47122A05771004F2AC0 /* Flutter */,
|
||||
33CC10EE2044A3C60003C045 /* Products */,
|
||||
D73912EC22F37F3D000D13A0 /* Frameworks */,
|
||||
02C0718F439899652B288987 /* Pods */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
33CC10EE2044A3C60003C045 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
33CC10ED2044A3C60003C045 /* dartpad_curve2_d_0.app */,
|
||||
33CC10ED2044A3C60003C045 /* flutter_api_samples.app */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
@@ -148,6 +166,7 @@
|
||||
D73912EC22F37F3D000D13A0 /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
639541EE500E1E798CB69526 /* Pods_Runner.framework */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
@@ -159,6 +178,7 @@
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */;
|
||||
buildPhases = (
|
||||
6365747C9AFB9FD3319FF0D0 /* [CP] Check Pods Manifest.lock */,
|
||||
33CC10E92044A3C60003C045 /* Sources */,
|
||||
33CC10EA2044A3C60003C045 /* Frameworks */,
|
||||
33CC10EB2044A3C60003C045 /* Resources */,
|
||||
@@ -172,7 +192,7 @@
|
||||
);
|
||||
name = Runner;
|
||||
productName = Runner;
|
||||
productReference = 33CC10ED2044A3C60003C045 /* dartpad_curve2_d_0.app */;
|
||||
productReference = 33CC10ED2044A3C60003C045 /* flutter_api_samples.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
@@ -270,6 +290,28 @@
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire";
|
||||
};
|
||||
6365747C9AFB9FD3319FF0D0 /* [CP] Check Pods Manifest.lock */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
);
|
||||
inputPaths = (
|
||||
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
|
||||
"${PODS_ROOT}/Manifest.lock",
|
||||
);
|
||||
name = "[CP] Check Pods Manifest.lock";
|
||||
outputFileListPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
"$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
|
||||
BuildableName = "dartpad_curve2_d_0.app"
|
||||
BuildableName = "flutter_api_samples.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
@@ -31,7 +31,7 @@
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
|
||||
BuildableName = "dartpad_curve2_d_0.app"
|
||||
BuildableName = "flutter_api_samples.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
@@ -54,7 +54,7 @@
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
|
||||
BuildableName = "dartpad_curve2_d_0.app"
|
||||
BuildableName = "flutter_api_samples.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
@@ -73,7 +73,7 @@
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
|
||||
BuildableName = "dartpad_curve2_d_0.app"
|
||||
BuildableName = "flutter_api_samples.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
|
||||
@@ -4,4 +4,7 @@
|
||||
<FileRef
|
||||
location = "group:Runner.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:Pods/Pods.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
// 'flutter create' template.
|
||||
|
||||
// The application's name. By default this is also the title of the Flutter window.
|
||||
PRODUCT_NAME = dartpad_curve2_d_0
|
||||
PRODUCT_NAME = flutter_api_samples
|
||||
|
||||
// The application's bundle identifier
|
||||
PRODUCT_BUNDLE_IDENTIFIER = dev.flutter.dartpadCurve2D0
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>com.apple.security.app-sandbox</key>
|
||||
<true/>
|
||||
<false/>
|
||||
<key>com.apple.security.cs.allow-jit</key>
|
||||
<true/>
|
||||
<key>com.apple.security.network.server</key>
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>com.apple.security.app-sandbox</key>
|
||||
<true/>
|
||||
<false/>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
@@ -12,29 +12,73 @@ dependencies:
|
||||
cupertino_icons: 1.0.3
|
||||
flutter:
|
||||
sdk: flutter
|
||||
|
||||
characters: 1.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
collection: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
meta: 1.7.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
typed_data: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
|
||||
dev_dependencies:
|
||||
integration_test:
|
||||
sdk: flutter
|
||||
flutter_driver:
|
||||
sdk: flutter
|
||||
flutter_test:
|
||||
sdk: flutter
|
||||
test: 1.17.12
|
||||
|
||||
_fe_analyzer_shared: 26.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
analyzer: 2.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
archive: 3.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
args: 2.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
async: 2.8.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
boolean_selector: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
characters: 1.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
charcode: 1.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
cli_util: 0.3.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
clock: 1.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
collection: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
convert: 3.0.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
coverage: 1.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
crypto: 3.0.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
fake_async: 1.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
file: 6.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
frontend_server_client: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
glob: 2.0.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
http_multi_server: 3.0.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
http_parser: 4.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
io: 1.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
js: 0.6.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
logging: 1.0.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
matcher: 0.12.11 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
meta: 1.7.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
mime: 1.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
node_preamble: 2.0.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
package_config: 2.0.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
path: 1.8.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
pedantic: 1.11.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
pool: 1.5.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
pub_semver: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
shelf: 1.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
shelf_packages_handler: 3.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
shelf_static: 1.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
shelf_web_socket: 1.0.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
source_map_stack_trace: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
source_maps: 0.10.10 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
source_span: 1.8.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
stack_trace: 1.10.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
stream_channel: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
string_scanner: 1.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
sync_http: 0.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
term_glyph: 1.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
test_api: 0.4.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
typed_data: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vector_math: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
test_core: 0.4.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
vm_service: 7.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
watcher: 1.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
web_socket_channel: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
webdriver: 3.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
webkit_inspection_protocol: 1.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
yaml: 3.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
|
||||
flutter:
|
||||
uses-material-design: true
|
||||
|
||||
# PUBSPEC CHECKSUM: b7be
|
||||
# PUBSPEC CHECKSUM: e9cf
|
||||
|
||||
7
examples/api/test_driver/integration_test.dart
Normal file
7
examples/api/test_driver/integration_test.dart
Normal file
@@ -0,0 +1,7 @@
|
||||
// Copyright 2014 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'package:integration_test/integration_test_driver.dart';
|
||||
|
||||
Future<void> main() => integrationDriver();
|
||||
@@ -26,10 +26,10 @@ found in the LICENSE file. -->
|
||||
<!-- iOS meta tags & icons -->
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
<meta name="apple-mobile-web-app-title" content="dartpad_curve2_d_0">
|
||||
<meta name="apple-mobile-web-app-title" content="flutter_api_samples">
|
||||
<link rel="apple-touch-icon" href="icons/Icon-192.png">
|
||||
|
||||
<title>dartpad_curve2_d_0</title>
|
||||
<title>flutter_api_samples</title>
|
||||
<link rel="manifest" href="manifest.json">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "dartpad_curve2_d_0",
|
||||
"short_name": "dartpad_curve2_d_0",
|
||||
"name": "flutter_api_samples",
|
||||
"short_name": "flutter_api_samples",
|
||||
"start_url": ".",
|
||||
"display": "standalone",
|
||||
"background_color": "#0175C2",
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
// Copyright 2014 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
//
|
||||
// Generated file. Do not edit.
|
||||
//
|
||||
|
||||
@@ -92,10 +92,10 @@ BEGIN
|
||||
VALUE "CompanyName", "dev.flutter" "\0"
|
||||
VALUE "FileDescription", "A temporary code sample for Curve2D" "\0"
|
||||
VALUE "FileVersion", VERSION_AS_STRING "\0"
|
||||
VALUE "InternalName", "dartpad_curve2_d_0" "\0"
|
||||
VALUE "InternalName", "flutter_api_samples" "\0"
|
||||
VALUE "LegalCopyright", "Copyright (C) 2021 dev.flutter. All rights reserved." "\0"
|
||||
VALUE "OriginalFilename", "dartpad_curve2_d_0.exe" "\0"
|
||||
VALUE "ProductName", "dartpad_curve2_d_0" "\0"
|
||||
VALUE "OriginalFilename", "flutter_api_samples.exe" "\0"
|
||||
VALUE "ProductName", "flutter_api_samples" "\0"
|
||||
VALUE "ProductVersion", VERSION_AS_STRING "\0"
|
||||
END
|
||||
END
|
||||
|
||||
@@ -27,7 +27,7 @@ int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev,
|
||||
FlutterWindow window(project);
|
||||
Win32Window::Point origin(10, 10);
|
||||
Win32Window::Size size(1280, 720);
|
||||
if (!window.CreateAndShow(L"dartpad_curve2_d_0", origin, size)) {
|
||||
if (!window.CreateAndShow(L"flutter_api_samples", origin, size)) {
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
window.SetQuitOnClose(true);
|
||||
|
||||
Reference in New Issue
Block a user