code
stringlengths 8
3.25M
| repository
stringlengths 15
175
| metadata
stringlengths 66
249
|
---|---|---|
// 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:flutter/material.dart';
import '../../gallery/demo.dart';
class ModalBottomSheetDemo extends StatelessWidget {
const ModalBottomSheetDemo({super.key});
static const String routeName = '/material/modal-bottom-sheet';
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('Modal bottom sheet'),
actions: <Widget>[MaterialDemoDocumentationButton(routeName)],
),
body: Center(
child: ElevatedButton(
child: const Text('SHOW BOTTOM SHEET'),
onPressed: () {
showModalBottomSheet<void>(context: context, builder: (BuildContext context) {
return Padding(
padding: const EdgeInsets.all(32.0),
child: Text('This is the modal bottom sheet. Slide down to dismiss.',
textAlign: TextAlign.center,
style: TextStyle(
color: Theme.of(context).colorScheme.secondary,
fontSize: 24.0,
),
),
);
});
},
),
),
);
}
}
| flutter/dev/integration_tests/flutter_gallery/lib/demo/material/modal_bottom_sheet_demo.dart/0 | {'file_path': 'flutter/dev/integration_tests/flutter_gallery/lib/demo/material/modal_bottom_sheet_demo.dart', 'repo_id': 'flutter', 'token_count': 593} |
// 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:flutter/material.dart';
import 'backdrop.dart';
import 'category_menu_page.dart';
import 'colors.dart';
import 'expanding_bottom_sheet.dart';
import 'home.dart';
import 'login.dart';
import 'supplemental/cut_corners_border.dart';
class ShrineApp extends StatefulWidget {
const ShrineApp({super.key});
@override
State<ShrineApp> createState() => _ShrineAppState();
}
class _ShrineAppState extends State<ShrineApp> with SingleTickerProviderStateMixin {
// Controller to coordinate both the opening/closing of backdrop and sliding
// of expanding bottom sheet
late AnimationController _controller;
@override
void initState() {
super.initState();
_controller = AnimationController(
vsync: this,
duration: const Duration(milliseconds: 450),
value: 1.0,
);
}
@override
Widget build(BuildContext context) {
return MaterialApp(
// The automatically applied scrollbars on desktop can cause a crash for
// demos where many scrollables are all attached to the same
// PrimaryScrollController. The gallery needs to be migrated before
// enabling this. https://github.com/flutter/gallery/issues/523
scrollBehavior: const MaterialScrollBehavior().copyWith(scrollbars: false),
title: 'Shrine',
home: HomePage(
backdrop: Backdrop(
frontLayer: const ProductPage(),
backLayer: CategoryMenuPage(onCategoryTap: () => _controller.forward()),
frontTitle: const Text('SHRINE'),
backTitle: const Text('MENU'),
controller: _controller,
),
expandingBottomSheet: ExpandingBottomSheet(hideController: _controller),
),
initialRoute: '/login',
onGenerateRoute: _getRoute,
// Copy the platform from the main theme in order to support platform
// toggling from the Gallery options menu.
theme: _kShrineTheme.copyWith(platform: Theme.of(context).platform),
);
}
}
Route<dynamic>? _getRoute(RouteSettings settings) {
if (settings.name != '/login') {
return null;
}
return MaterialPageRoute<void>(
settings: settings,
builder: (BuildContext context) => const LoginPage(),
fullscreenDialog: true,
);
}
final ThemeData _kShrineTheme = _buildShrineTheme();
IconThemeData _customIconTheme(IconThemeData original) {
return original.copyWith(color: kShrineBrown900);
}
ThemeData _buildShrineTheme() {
final ThemeData base = ThemeData.light();
return base.copyWith(
colorScheme: kShrineColorScheme,
primaryColor: kShrinePink100,
scaffoldBackgroundColor: kShrineBackgroundWhite,
cardColor: kShrineBackgroundWhite,
primaryIconTheme: _customIconTheme(base.iconTheme),
inputDecorationTheme: const InputDecorationTheme(border: CutCornersBorder()),
textTheme: _buildShrineTextTheme(base.textTheme),
primaryTextTheme: _buildShrineTextTheme(base.primaryTextTheme),
iconTheme: _customIconTheme(base.iconTheme),
);
}
TextTheme _buildShrineTextTheme(TextTheme base) {
return base.copyWith(
headlineSmall: base.headlineSmall!.copyWith(fontWeight: FontWeight.w500),
titleLarge: base.titleLarge!.copyWith(fontSize: 18.0),
bodySmall: base.bodySmall!.copyWith(fontWeight: FontWeight.w400, fontSize: 14.0),
bodyLarge: base.bodyLarge!.copyWith(fontWeight: FontWeight.w500, fontSize: 16.0),
labelLarge: base.labelLarge!.copyWith(fontWeight: FontWeight.w500, fontSize: 14.0),
).apply(
fontFamily: 'Raleway',
displayColor: kShrineBrown900,
bodyColor: kShrineBrown900,
);
}
const ColorScheme kShrineColorScheme = ColorScheme(
primary: kShrinePink100,
secondary: kShrinePink50,
surface: kShrineSurfaceWhite,
background: kShrineBackgroundWhite,
error: kShrineErrorRed,
onPrimary: kShrineBrown900,
onSecondary: kShrineBrown900,
onSurface: kShrineBrown900,
onBackground: kShrineBrown900,
onError: kShrineSurfaceWhite,
brightness: Brightness.light,
);
| flutter/dev/integration_tests/flutter_gallery/lib/demo/shrine/app.dart/0 | {'file_path': 'flutter/dev/integration_tests/flutter_gallery/lib/demo/shrine/app.dart', 'repo_id': 'flutter', 'token_count': 1391} |
// 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 'dart:ui' show Vertices;
import 'package:flutter/material.dart';
import 'transformations_demo_board.dart';
import 'transformations_demo_edit_board_point.dart';
import 'transformations_demo_gesture_transformable.dart';
class TransformationsDemo extends StatefulWidget {
const TransformationsDemo({ super.key });
static const String routeName = '/transformations';
@override
State<TransformationsDemo> createState() => _TransformationsDemoState();
}
class _TransformationsDemoState extends State<TransformationsDemo> {
// The radius of a hexagon tile in pixels.
static const double _kHexagonRadius = 32.0;
// The margin between hexagons.
static const double _kHexagonMargin = 1.0;
// The radius of the entire board in hexagons, not including the center.
static const int _kBoardRadius = 8;
bool _reset = false;
Board _board = Board(
boardRadius: _kBoardRadius,
hexagonRadius: _kHexagonRadius,
hexagonMargin: _kHexagonMargin,
);
@override
Widget build (BuildContext context) {
final BoardPainter painter = BoardPainter(
board: _board,
);
// The scene is drawn by a CustomPaint, but user interaction is handled by
// the GestureTransformable parent widget.
return Scaffold(
appBar: AppBar(
title: const Text('2D Transformations'),
actions: <Widget>[
IconButton(
icon: const Icon(Icons.help),
tooltip: 'Help',
onPressed: () {
showDialog<Column>(
context: context,
builder: (BuildContext context) => instructionDialog,
);
},
),
],
),
body: LayoutBuilder(
builder: (BuildContext context, BoxConstraints constraints) {
// Draw the scene as big as is available, but allow the user to
// translate beyond that to a visibleSize that's a bit bigger.
final Size size = Size(constraints.maxWidth, constraints.maxHeight);
final Size visibleSize = Size(size.width * 3, size.height * 2);
return GestureTransformable(
reset: _reset,
onResetEnd: () {
setState(() {
_reset = false;
});
},
boundaryRect: Rect.fromLTWH(
-visibleSize.width / 2,
-visibleSize.height / 2,
visibleSize.width,
visibleSize.height,
),
// Center the board in the middle of the screen. It's drawn centered
// at the origin, which is the top left corner of the
// GestureTransformable.
initialTranslation: Offset(size.width / 2, size.height / 2),
onTapUp: _onTapUp,
size: size,
child: CustomPaint(
painter: painter,
),
);
},
),
floatingActionButton: _board.selected == null ? resetButton : editButton,
);
}
Widget get instructionDialog {
return AlertDialog(
title: const Text('2D Transformations'),
content: const Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Text('Tap to edit hex tiles, and use gestures to move around the scene:\n'),
Text('- Drag to pan.'),
Text('- Pinch to zoom.'),
Text('- Rotate with two fingers.'),
Text('\nYou can always press the home button to return to the starting orientation!'),
],
),
actions: <Widget>[
TextButton(
child: const Text('OK'),
onPressed: () {
Navigator.of(context).pop();
},
),
],
);
}
FloatingActionButton get resetButton {
return FloatingActionButton(
onPressed: () {
setState(() {
_reset = true;
});
},
tooltip: 'Reset Transform',
backgroundColor: Theme.of(context).primaryColor,
child: const Icon(Icons.home),
);
}
FloatingActionButton get editButton {
return FloatingActionButton(
onPressed: () {
if (_board.selected == null) {
return;
}
showModalBottomSheet<Widget>(context: context, builder: (BuildContext context) {
return Container(
width: double.infinity,
height: 150,
padding: const EdgeInsets.all(12.0),
child: EditBoardPoint(
boardPoint: _board.selected!,
onColorSelection: (Color color) {
setState(() {
_board = _board.copyWithBoardPointColor(_board.selected!, color);
Navigator.pop(context);
});
},
),
);
});
},
tooltip: 'Edit Tile',
child: const Icon(Icons.edit),
);
}
void _onTapUp(TapUpDetails details) {
final Offset scenePoint = details.globalPosition;
final BoardPoint? boardPoint = _board.pointToBoardPoint(scenePoint);
setState(() {
_board = _board.copyWithSelected(boardPoint);
});
}
}
// CustomPainter is what is passed to CustomPaint and actually draws the scene
// when its `paint` method is called.
class BoardPainter extends CustomPainter {
const BoardPainter({
this.board,
});
final Board? board;
@override
void paint(Canvas canvas, Size size) {
void drawBoardPoint(BoardPoint? boardPoint) {
final Color color = boardPoint!.color.withOpacity(
board!.selected == boardPoint ? 0.2 : 1.0,
);
final Vertices vertices = board!.getVerticesForBoardPoint(boardPoint, color);
canvas.drawVertices(vertices, BlendMode.color, Paint());
vertices.dispose();
}
board!.forEach(drawBoardPoint);
}
// We should repaint whenever the board changes, such as board.selected.
@override
bool shouldRepaint(BoardPainter oldDelegate) {
return oldDelegate.board != board;
}
}
| flutter/dev/integration_tests/flutter_gallery/lib/demo/transformations/transformations_demo.dart/0 | {'file_path': 'flutter/dev/integration_tests/flutter_gallery/lib/demo/transformations/transformations_demo.dart', 'repo_id': 'flutter', 'token_count': 2562} |
// 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:flutter_driver/flutter_driver.dart';
import 'package:test/test.dart' hide TypeMatcher, isInstanceOf;
void main() {
late FlutterDriver driver;
setUpAll(() async {
driver = await FlutterDriver.connect();
});
tearDownAll(() async {
await driver.close();
});
test('check that we are painting in debugPaintSize mode', () async {
expect(await driver.requestData('status'), 'log: paint debugPaintSize');
}, timeout: Timeout.none);
}
| flutter/dev/integration_tests/ui/test_driver/commands_debug_paint_test.dart/0 | {'file_path': 'flutter/dev/integration_tests/ui/test_driver/commands_debug_paint_test.dart', 'repo_id': 'flutter', 'token_count': 196} |
// 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:flutter/foundation.dart';
import 'package:flutter/material.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return const MaterialApp(
key: Key('mainapp'),
title: 'Platform Test',
home: MyHomePage(),
);
}
}
class MyHomePage extends StatelessWidget {
const MyHomePage({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
if (defaultTargetPlatform == TargetPlatform.macOS)
const Text(
'I am running on MacOS',
key: Key('macOSKey'),
),
if (defaultTargetPlatform == TargetPlatform.iOS)
const Text(
'I am running on MacOS',
key: Key('iOSKey'),
),
if (defaultTargetPlatform == TargetPlatform.android)
const Text(
'I am running on Android',
key: Key('androidKey'),
),
],
),
),
);
}
}
| flutter/dev/integration_tests/web_e2e_tests/lib/target_platform_main.dart/0 | {'file_path': 'flutter/dev/integration_tests/web_e2e_tests/lib/target_platform_main.dart', 'repo_id': 'flutter', 'token_count': 625} |
// 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.
// This file is part of dev/bots/test.dart's runTracingTests test.
import 'package:flutter/foundation.dart';
void main() {
// This file is intended to be compiled in profile mode.
// In that mode, the function below throws an exception.
// The dev/bots/test.dart test looks for the string from that exception.
// The string below is matched verbatim in dev/bots/test.dart as a control
// to make sure this file did get compiled.
DiagnosticsNode.message('TIMELINE ARGUMENTS TEST CONTROL FILE').toTimelineArguments();
}
| flutter/dev/tracing_tests/lib/control.dart/0 | {'file_path': 'flutter/dev/tracing_tests/lib/control.dart', 'repo_id': 'flutter', 'token_count': 197} |
// 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.
// Flutter code sample for [CupertinoFormRow].
import 'package:flutter/cupertino.dart';
void main() => runApp(const CupertinoFormRowApp());
class CupertinoFormRowApp extends StatelessWidget {
const CupertinoFormRowApp({super.key});
@override
Widget build(BuildContext context) {
return const CupertinoApp(
theme: CupertinoThemeData(brightness: Brightness.light),
home: CupertinoFormRowExample(),
);
}
}
class CupertinoFormRowExample extends StatefulWidget {
const CupertinoFormRowExample({super.key});
@override
State<CupertinoFormRowExample> createState() => _CupertinoFormRowExampleState();
}
class _CupertinoFormRowExampleState extends State<CupertinoFormRowExample> {
bool airplaneMode = false;
@override
Widget build(BuildContext context) {
return CupertinoPageScaffold(
navigationBar: const CupertinoNavigationBar(
middle: Text('CupertinoFormSection Sample'),
),
// Add safe area widget to place the CupertinoFormSection below the navigation bar.
child: SafeArea(
child: CupertinoFormSection(
header: const Text('Connectivity'),
children: <Widget>[
CupertinoFormRow(
prefix: const PrefixWidget(
icon: CupertinoIcons.airplane,
title: 'Airplane Mode',
color: CupertinoColors.systemOrange,
),
child: CupertinoSwitch(
value: airplaneMode,
onChanged: (bool value) {
setState(() {
airplaneMode = value;
});
},
),
),
const CupertinoFormRow(
prefix: PrefixWidget(
icon: CupertinoIcons.wifi,
title: 'Wi-Fi',
color: CupertinoColors.systemBlue,
),
error: Text('Home network unavailable'),
child: Row(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
Text('Not connected'),
SizedBox(width: 5),
Icon(CupertinoIcons.forward)
],
),
),
const CupertinoFormRow(
prefix: PrefixWidget(
icon: CupertinoIcons.bluetooth,
title: 'Bluetooth',
color: CupertinoColors.activeBlue,
),
helper: Padding(
padding: EdgeInsets.symmetric(vertical: 4.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Text('Headphone'),
Text('Connected'),
],
),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
Text('On'),
SizedBox(width: 5),
Icon(CupertinoIcons.forward)
],
),
),
const CupertinoFormRow(
prefix: PrefixWidget(
icon: CupertinoIcons.bluetooth,
title: 'Mobile Data',
color: CupertinoColors.systemGreen,
),
child: Icon(CupertinoIcons.forward),
),
],
),
),
);
}
}
class PrefixWidget extends StatelessWidget {
const PrefixWidget({
super.key,
required this.icon,
required this.title,
required this.color,
});
final IconData icon;
final String title;
final Color color;
@override
Widget build(BuildContext context) {
return Row(
children: <Widget>[
Container(
padding: const EdgeInsets.all(4.0),
decoration: BoxDecoration(
color: color,
borderRadius: BorderRadius.circular(4.0),
),
child: Icon(icon, color: CupertinoColors.white),
),
const SizedBox(width: 15),
Text(title)
],
);
}
}
| flutter/examples/api/lib/cupertino/form_row/cupertino_form_row.0.dart/0 | {'file_path': 'flutter/examples/api/lib/cupertino/form_row/cupertino_form_row.0.dart', 'repo_id': 'flutter', 'token_count': 2139} |
// 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.
// Flutter code sample for [CupertinoSlider].
import 'package:flutter/cupertino.dart';
void main() => runApp(const CupertinoSliderApp());
class CupertinoSliderApp extends StatelessWidget {
const CupertinoSliderApp({super.key});
@override
Widget build(BuildContext context) {
return const CupertinoApp(
theme: CupertinoThemeData(brightness: Brightness.light),
home: CupertinoSliderExample(),
);
}
}
class CupertinoSliderExample extends StatefulWidget {
const CupertinoSliderExample({super.key});
@override
State<CupertinoSliderExample> createState() => _CupertinoSliderExampleState();
}
class _CupertinoSliderExampleState extends State<CupertinoSliderExample> {
double _currentSliderValue = 0.0;
String? _sliderStatus;
@override
Widget build(BuildContext context) {
return CupertinoPageScaffold(
navigationBar: const CupertinoNavigationBar(
middle: Text('CupertinoSlider Sample'),
),
child: Center(
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
// Display the current slider value.
Text('$_currentSliderValue'),
CupertinoSlider(
key: const Key('slider'),
value: _currentSliderValue,
// This allows the slider to jump between divisions.
// If null, the slide movement is continuous.
divisions: 5,
// The maximum slider value
max: 100,
activeColor: CupertinoColors.systemPurple,
thumbColor: CupertinoColors.systemPurple,
// This is called when sliding is started.
onChangeStart: (double value) {
setState(() {
_sliderStatus = 'Sliding';
});
},
// This is called when sliding has ended.
onChangeEnd: (double value) {
setState(() {
_sliderStatus = 'Finished sliding';
});
},
// This is called when slider value is changed.
onChanged: (double value) {
setState(() {
_currentSliderValue = value;
});
},
),
Text(
_sliderStatus ?? '',
style: CupertinoTheme.of(context).textTheme.textStyle.copyWith(
fontSize: 12,
),
),
],
),
),
);
}
}
| flutter/examples/api/lib/cupertino/slider/cupertino_slider.0.dart/0 | {'file_path': 'flutter/examples/api/lib/cupertino/slider/cupertino_slider.0.dart', 'repo_id': 'flutter', 'token_count': 1231} |
// 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.
// Flutter code sample for [SliverAppBar.medium].
import 'package:flutter/material.dart';
void main() {
runApp(const AppBarMediumApp());
}
class AppBarMediumApp extends StatelessWidget {
const AppBarMediumApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
theme: ThemeData(
useMaterial3: true,
colorSchemeSeed: const Color(0xff6750A4)
),
home: Material(
child: CustomScrollView(
slivers: <Widget>[
SliverAppBar.medium(
leading: IconButton(icon: const Icon(Icons.menu), onPressed: () {}),
title: const Text('Medium App Bar'),
actions: <Widget>[
IconButton(icon: const Icon(Icons.more_vert), onPressed: () {}),
],
),
// Just some content big enough to have something to scroll.
SliverToBoxAdapter(
child: Card(
child: SizedBox(
height: 1200,
child: Padding(
padding: const EdgeInsets.fromLTRB(8, 100, 8, 100),
child: Text(
'Here be scrolling content...',
style: Theme.of(context).textTheme.headlineSmall,
),
),
),
),
),
],
),
),
);
}
}
| flutter/examples/api/lib/material/app_bar/sliver_app_bar.2.dart/0 | {'file_path': 'flutter/examples/api/lib/material/app_bar/sliver_app_bar.2.dart', 'repo_id': 'flutter', 'token_count': 776} |
// 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.
// Flutter code sample for [Card].
import 'package:flutter/material.dart';
void main() { runApp(const CardExamplesApp()); }
class CardExamplesApp extends StatelessWidget {
const CardExamplesApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
theme: ThemeData(colorSchemeSeed: const Color(0xff6750a4), useMaterial3: true),
home: Scaffold(
appBar: AppBar(title: const Text('Card Examples')),
body: const Column(
children: <Widget>[
Spacer(),
ElevatedCardExample(),
FilledCardExample(),
OutlinedCardExample(),
Spacer(),
],
),
),
);
}
}
/// An example of the elevated card type.
///
/// The default settings for [Card] will provide an elevated
/// card matching the spec:
///
/// https://m3.material.io/components/cards/specs#a012d40d-7a5c-4b07-8740-491dec79d58b
class ElevatedCardExample extends StatelessWidget {
const ElevatedCardExample({ super.key });
@override
Widget build(BuildContext context) {
return const Center(
child: Card(
child: SizedBox(
width: 300,
height: 100,
child: Center(child: Text('Elevated Card')),
),
),
);
}
}
/// An example of the filled card type.
///
/// To make a [Card] match the filled type, the default elevation and color
/// need to be changed to the values from the spec:
///
/// https://m3.material.io/components/cards/specs#0f55bf62-edf2-4619-b00d-b9ed462f2c5a
class FilledCardExample extends StatelessWidget {
const FilledCardExample({ super.key });
@override
Widget build(BuildContext context) {
return Center(
child: Card(
elevation: 0,
color: Theme.of(context).colorScheme.surfaceVariant,
child: const SizedBox(
width: 300,
height: 100,
child: Center(child: Text('Filled Card')),
),
),
);
}
}
/// An example of the outlined card type.
///
/// To make a [Card] match the outlined type, the default elevation and shape
/// need to be changed to the values from the spec:
///
/// https://m3.material.io/components/cards/specs#0f55bf62-edf2-4619-b00d-b9ed462f2c5a
class OutlinedCardExample extends StatelessWidget {
const OutlinedCardExample({ super.key });
@override
Widget build(BuildContext context) {
return Center(
child: Card(
elevation: 0,
shape: RoundedRectangleBorder(
side: BorderSide(
color: Theme.of(context).colorScheme.outline,
),
borderRadius: const BorderRadius.all(Radius.circular(12)),
),
child: const SizedBox(
width: 300,
height: 100,
child: Center(child: Text('Outlined Card')),
),
),
);
}
}
| flutter/examples/api/lib/material/card/card.2.dart/0 | {'file_path': 'flutter/examples/api/lib/material/card/card.2.dart', 'repo_id': 'flutter', 'token_count': 1201} |
// 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.
// Flutter code sample for [ElevatedButton].
import 'package:flutter/material.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({super.key});
static const String _title = 'Flutter Code Sample';
@override
Widget build(BuildContext context) {
return MaterialApp(
title: _title,
home: Scaffold(
appBar: AppBar(title: const Text(_title)),
body: const MyStatefulWidget(),
),
);
}
}
class MyStatefulWidget extends StatefulWidget {
const MyStatefulWidget({super.key});
@override
State<MyStatefulWidget> createState() => _MyStatefulWidgetState();
}
class _MyStatefulWidgetState extends State<MyStatefulWidget> {
@override
Widget build(BuildContext context) {
final ButtonStyle style =
ElevatedButton.styleFrom(textStyle: const TextStyle(fontSize: 20));
return Center(
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
ElevatedButton(
style: style,
onPressed: null,
child: const Text('Disabled'),
),
const SizedBox(height: 30),
ElevatedButton(
style: style,
onPressed: () {},
child: const Text('Enabled'),
),
],
),
);
}
}
| flutter/examples/api/lib/material/elevated_button/elevated_button.0.dart/0 | {'file_path': 'flutter/examples/api/lib/material/elevated_button/elevated_button.0.dart', 'repo_id': 'flutter', 'token_count': 591} |
// 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.
// Flutter code sample for [InputDecoration.suffixIconConstraints].
import 'package:flutter/material.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({super.key});
static const String _title = 'Flutter Code Sample';
@override
Widget build(BuildContext context) {
return MaterialApp(
title: _title,
home: Scaffold(
appBar: AppBar(title: const Text(_title)),
body: const MyStatelessWidget(),
),
);
}
}
class MyStatelessWidget extends StatelessWidget {
const MyStatelessWidget({super.key});
@override
Widget build(BuildContext context) {
return const Padding(
padding: EdgeInsets.symmetric(horizontal: 8.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
TextField(
decoration: InputDecoration(
hintText: 'Normal Icon Constraints',
suffixIcon: Icon(Icons.search),
),
),
SizedBox(height: 10),
TextField(
decoration: InputDecoration(
isDense: true,
hintText: 'Smaller Icon Constraints',
suffixIcon: Icon(Icons.search),
suffixIconConstraints: BoxConstraints(
minHeight: 32,
minWidth: 32,
),
),
),
],
),
);
}
}
| flutter/examples/api/lib/material/input_decorator/input_decoration.suffix_icon_constraints.0.dart/0 | {'file_path': 'flutter/examples/api/lib/material/input_decorator/input_decoration.suffix_icon_constraints.0.dart', 'repo_id': 'flutter', 'token_count': 693} |
// 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.
// Flutter code sample for [Scaffold].
import 'package:flutter/material.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({super.key});
static const String _title = 'Flutter Code Sample';
@override
Widget build(BuildContext context) {
return const MaterialApp(
title: _title,
home: MyStatefulWidget(),
);
}
}
class MyStatefulWidget extends StatefulWidget {
const MyStatefulWidget({super.key});
@override
State<MyStatefulWidget> createState() => _MyStatefulWidgetState();
}
class _MyStatefulWidgetState extends State<MyStatefulWidget> {
int _count = 0;
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('Sample Code'),
),
body: Center(child: Text('You have pressed the button $_count times.')),
floatingActionButton: FloatingActionButton(
onPressed: () => setState(() => _count++),
tooltip: 'Increment Counter',
child: const Icon(Icons.add),
),
);
}
}
| flutter/examples/api/lib/material/scaffold/scaffold.0.dart/0 | {'file_path': 'flutter/examples/api/lib/material/scaffold/scaffold.0.dart', 'repo_id': 'flutter', 'token_count': 422} |
// 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.
// Flutter code sample for [ToggleButtons].
import 'package:flutter/material.dart';
const List<Widget> fruits = <Widget>[
Text('Apple'),
Text('Banana'),
Text('Orange')
];
const List<Widget> vegetables = <Widget>[
Text('Tomatoes'),
Text('Potatoes'),
Text('Carrots')
];
const List<Widget> icons = <Widget>[
Icon(Icons.sunny),
Icon(Icons.cloud),
Icon(Icons.ac_unit),
];
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({super.key});
static const String _title = 'ToggleButtons Sample';
@override
Widget build(BuildContext context) {
return const MaterialApp(
title: _title,
home: ToggleButtonsSample(title: _title),
);
}
}
class ToggleButtonsSample extends StatefulWidget {
const ToggleButtonsSample({super.key, required this.title});
final String title;
@override
State<ToggleButtonsSample> createState() => _ToggleButtonsSampleState();
}
class _ToggleButtonsSampleState extends State<ToggleButtonsSample> {
final List<bool> _selectedFruits = <bool>[true, false, false];
final List<bool> _selectedVegetables = <bool>[false, true, false];
final List<bool> _selectedWeather = <bool>[false, false, true];
bool vertical = false;
@override
Widget build(BuildContext context) {
final ThemeData theme = Theme.of(context);
return Scaffold(
appBar: AppBar(title: Text(widget.title)),
body: Center(
child: SingleChildScrollView(
child: Column(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
// ToggleButtons with a single selection.
Text('Single-select', style: theme.textTheme.titleSmall),
const SizedBox(height: 5),
ToggleButtons(
direction: vertical ? Axis.vertical : Axis.horizontal,
onPressed: (int index) {
setState(() {
// The button that is tapped is set to true, and the others to false.
for (int i = 0; i < _selectedFruits.length; i++) {
_selectedFruits[i] = i == index;
}
});
},
borderRadius: const BorderRadius.all(Radius.circular(8)),
selectedBorderColor: Colors.red[700],
selectedColor: Colors.white,
fillColor: Colors.red[200],
color: Colors.red[400],
constraints: const BoxConstraints(
minHeight: 40.0,
minWidth: 80.0,
),
isSelected: _selectedFruits,
children: fruits,
),
const SizedBox(height: 20),
// ToggleButtons with a multiple selection.
Text('Multi-select', style: theme.textTheme.titleSmall),
const SizedBox(height: 5),
ToggleButtons(
direction: vertical ? Axis.vertical : Axis.horizontal,
onPressed: (int index) {
// All buttons are selectable.
setState(() {
_selectedVegetables[index] =
!_selectedVegetables[index];
});
},
borderRadius: const BorderRadius.all(Radius.circular(8)),
selectedBorderColor: Colors.green[700],
selectedColor: Colors.white,
fillColor: Colors.green[200],
color: Colors.green[400],
constraints: const BoxConstraints(
minHeight: 40.0,
minWidth: 80.0,
),
isSelected: _selectedVegetables,
children: vegetables,
),
const SizedBox(height: 20),
// ToggleButtons with icons only.
Text('Icon-only', style: theme.textTheme.titleSmall),
const SizedBox(height: 5),
ToggleButtons(
direction: vertical ? Axis.vertical : Axis.horizontal,
onPressed: (int index) {
setState(() {
// The button that is tapped is set to true, and the others to false.
for (int i = 0; i < _selectedWeather.length; i++) {
_selectedWeather[i] = i == index;
}
});
},
borderRadius: const BorderRadius.all(Radius.circular(8)),
selectedBorderColor: Colors.blue[700],
selectedColor: Colors.white,
fillColor: Colors.blue[200],
color: Colors.blue[400],
isSelected: _selectedWeather,
children: icons,
),
],
),
),
),
floatingActionButton: FloatingActionButton.extended(
onPressed: () {
setState(() {
// When the button is pressed, ToggleButtons direction is changed.
vertical = !vertical;
});
},
icon: const Icon(Icons.screen_rotation_outlined),
label: Text(vertical ? 'Horizontal' : 'Vertical'),
),
);
}
}
| flutter/examples/api/lib/material/toggle_buttons/toggle_buttons.0.dart/0 | {'file_path': 'flutter/examples/api/lib/material/toggle_buttons/toggle_buttons.0.dart', 'repo_id': 'flutter', 'token_count': 2605} |
// 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.
// Flutter code sample for [FontFeature.FontFeature.numerators].
import 'dart:ui';
import 'package:flutter/widgets.dart';
void main() => runApp(const ExampleApp());
class ExampleApp extends StatelessWidget {
const ExampleApp({super.key});
@override
Widget build(BuildContext context) {
return WidgetsApp(
builder: (BuildContext context, Widget? navigator) => const ExampleWidget(),
color: const Color(0xffffffff),
);
}
}
/// This is the stateless widget that the main application instantiates.
class ExampleWidget extends StatelessWidget {
const ExampleWidget({super.key});
@override
Widget build(BuildContext context) {
// The Piazzolla font can be downloaded from Google Fonts
// (https://www.google.com/fonts).
return const Text(
'Fractions: 1/2 2/3 3/4 4/5',
style: TextStyle(
fontFamily: 'Piazzolla',
fontFeatures: <FontFeature>[
FontFeature.numerators(),
],
),
);
}
}
| flutter/examples/api/lib/ui/text/font_feature.font_feature_numerators.0.dart/0 | {'file_path': 'flutter/examples/api/lib/ui/text/font_feature.font_feature_numerators.0.dart', 'repo_id': 'flutter', 'token_count': 394} |
// 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.
// Flutter code sample for [FocusableActionDetector].
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({super.key});
static const String _title = 'Flutter Code Sample';
@override
Widget build(BuildContext context) {
return const MaterialApp(
title: _title,
home: MyStatefulWidget(),
);
}
}
class FadButton extends StatefulWidget {
const FadButton({
super.key,
required this.onPressed,
required this.child,
});
final VoidCallback onPressed;
final Widget child;
@override
State<FadButton> createState() => _FadButtonState();
}
class _FadButtonState extends State<FadButton> {
bool _focused = false;
bool _hovering = false;
bool _on = false;
late final Map<Type, Action<Intent>> _actionMap;
final Map<ShortcutActivator, Intent> _shortcutMap =
const <ShortcutActivator, Intent>{
SingleActivator(LogicalKeyboardKey.keyX): ActivateIntent(),
};
@override
void initState() {
super.initState();
_actionMap = <Type, Action<Intent>>{
ActivateIntent: CallbackAction<Intent>(
onInvoke: (Intent intent) => _toggleState(),
),
};
}
Color get color {
Color baseColor = Colors.lightBlue;
if (_focused) {
baseColor = Color.alphaBlend(Colors.black.withOpacity(0.25), baseColor);
}
if (_hovering) {
baseColor = Color.alphaBlend(Colors.black.withOpacity(0.1), baseColor);
}
return baseColor;
}
void _toggleState() {
setState(() {
_on = !_on;
});
}
void _handleFocusHighlight(bool value) {
setState(() {
_focused = value;
});
}
void _handleHoveHighlight(bool value) {
setState(() {
_hovering = value;
});
}
@override
Widget build(BuildContext context) {
return GestureDetector(
onTap: _toggleState,
child: FocusableActionDetector(
actions: _actionMap,
shortcuts: _shortcutMap,
onShowFocusHighlight: _handleFocusHighlight,
onShowHoverHighlight: _handleHoveHighlight,
child: Row(
children: <Widget>[
Container(
padding: const EdgeInsets.all(10.0),
color: color,
child: widget.child,
),
Container(
width: 30,
height: 30,
margin: const EdgeInsets.all(10.0),
color: _on ? Colors.red : Colors.transparent,
),
],
),
),
);
}
}
class MyStatefulWidget extends StatefulWidget {
const MyStatefulWidget({super.key});
@override
State<MyStatefulWidget> createState() => _MyStatefulWidgetState();
}
class _MyStatefulWidgetState extends State<MyStatefulWidget> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('FocusableActionDetector Example'),
),
body: Center(
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Padding(
padding: const EdgeInsets.all(8.0),
child:
TextButton(onPressed: () {}, child: const Text('Press Me')),
),
Padding(
padding: const EdgeInsets.all(8.0),
child: FadButton(onPressed: () {}, child: const Text('And Me')),
),
],
),
),
);
}
}
| flutter/examples/api/lib/widgets/actions/focusable_action_detector.0.dart/0 | {'file_path': 'flutter/examples/api/lib/widgets/actions/focusable_action_detector.0.dart', 'repo_id': 'flutter', 'token_count': 1557} |
// 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.
// Flutter code sample for [MouseRegion.onExit].
import 'package:flutter/material.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({super.key});
static const String _title = 'Flutter Code Sample';
@override
Widget build(BuildContext context) {
return MaterialApp(
title: _title,
home: Scaffold(
appBar: AppBar(title: const Text(_title)),
body: const Center(
child: MyStatefulWidget(),
),
),
);
}
}
// A region that hides its content one second after being hovered.
class MyTimedButton extends StatefulWidget {
const MyTimedButton(
{super.key, required this.onEnterButton, required this.onExitButton});
final VoidCallback onEnterButton;
final VoidCallback onExitButton;
@override
State<MyTimedButton> createState() => _MyTimedButton();
}
class _MyTimedButton extends State<MyTimedButton> {
bool regionIsHidden = false;
bool hovered = false;
Future<void> startCountdown() async {
await Future<void>.delayed(const Duration(seconds: 1));
hideButton();
}
void hideButton() {
setState(() {
regionIsHidden = true;
});
// This statement is necessary.
if (hovered) {
widget.onExitButton();
}
}
@override
Widget build(BuildContext context) {
return SizedBox(
width: 100,
height: 100,
child: MouseRegion(
child: regionIsHidden
? null
: MouseRegion(
onEnter: (_) {
widget.onEnterButton();
setState(() {
hovered = true;
});
startCountdown();
},
onExit: (_) {
setState(() {
hovered = false;
});
widget.onExitButton();
},
child: Container(color: Colors.red),
),
),
);
}
}
class MyStatefulWidget extends StatefulWidget {
const MyStatefulWidget({super.key});
@override
State<MyStatefulWidget> createState() => _MyStatefulWidgetState();
}
class _MyStatefulWidgetState extends State<MyStatefulWidget> {
Key key = UniqueKey();
bool hovering = false;
@override
Widget build(BuildContext context) {
return Column(
children: <Widget>[
ElevatedButton(
onPressed: () {
setState(() {
key = UniqueKey();
});
},
child: const Text('Refresh'),
),
if (hovering) const Text('Hovering'),
if (!hovering) const Text('Not hovering'),
MyTimedButton(
key: key,
onEnterButton: () {
setState(() {
hovering = true;
});
},
onExitButton: () {
setState(() {
hovering = false;
});
},
),
],
);
}
}
| flutter/examples/api/lib/widgets/basic/mouse_region.on_exit.1.dart/0 | {'file_path': 'flutter/examples/api/lib/widgets/basic/mouse_region.on_exit.1.dart', 'repo_id': 'flutter', 'token_count': 1407} |
// 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.
// Flutter code sample for [FocusTraversalGroup].
import 'package:flutter/material.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({super.key});
static const String _title = 'Flutter Code Sample';
@override
Widget build(BuildContext context) {
return const MaterialApp(
title: _title,
home: MyStatelessWidget(),
);
}
}
/// A button wrapper that adds either a numerical or lexical order, depending on
/// the type of T.
class OrderedButton<T> extends StatefulWidget {
const OrderedButton({
super.key,
required this.name,
this.canRequestFocus = true,
this.autofocus = false,
required this.order,
});
final String name;
final bool canRequestFocus;
final bool autofocus;
final T order;
@override
State<OrderedButton<T>> createState() => _OrderedButtonState<T>();
}
class _OrderedButtonState<T> extends State<OrderedButton<T>> {
late FocusNode focusNode;
@override
void initState() {
super.initState();
focusNode = FocusNode(
debugLabel: widget.name,
canRequestFocus: widget.canRequestFocus,
);
}
@override
void dispose() {
focusNode.dispose();
super.dispose();
}
@override
void didUpdateWidget(OrderedButton<T> oldWidget) {
super.didUpdateWidget(oldWidget);
focusNode.canRequestFocus = widget.canRequestFocus;
}
void _handleOnPressed() {
focusNode.requestFocus();
debugPrint('Button ${widget.name} pressed.');
debugDumpFocusTree();
}
@override
Widget build(BuildContext context) {
FocusOrder order;
if (widget.order is num) {
order = NumericFocusOrder((widget.order as num).toDouble());
} else {
order = LexicalFocusOrder(widget.order.toString());
}
Color? overlayColor(Set<MaterialState> states) {
if (states.contains(MaterialState.focused)) {
return Colors.red;
}
if (states.contains(MaterialState.hovered)) {
return Colors.blue;
}
return null; // defer to the default overlayColor
}
Color? foregroundColor(Set<MaterialState> states) {
if (states.contains(MaterialState.focused) ||
states.contains(MaterialState.hovered)) {
return Colors.white;
}
return null; // defer to the default foregroundColor
}
return FocusTraversalOrder(
order: order,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: OutlinedButton(
focusNode: focusNode,
autofocus: widget.autofocus,
style: ButtonStyle(
overlayColor:
MaterialStateProperty.resolveWith<Color?>(overlayColor),
foregroundColor:
MaterialStateProperty.resolveWith<Color?>(foregroundColor),
),
onPressed: () => _handleOnPressed(),
child: Text(widget.name),
),
),
);
}
}
class MyStatelessWidget extends StatelessWidget {
const MyStatelessWidget({super.key});
@override
Widget build(BuildContext context) {
return ColoredBox(
color: Colors.white,
child: FocusTraversalGroup(
policy: OrderedTraversalPolicy(),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
// A group that is ordered with a numerical order, from left to right.
FocusTraversalGroup(
policy: OrderedTraversalPolicy(),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: List<Widget>.generate(3, (int index) {
return OrderedButton<num>(
name: 'num: $index',
// TRY THIS: change this to "3 - index" and see how the order changes.
order: index,
);
}),
),
),
// A group that is ordered with a lexical order, from right to left.
FocusTraversalGroup(
policy: OrderedTraversalPolicy(),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: List<Widget>.generate(3, (int index) {
// Order as "C" "B", "A".
final String order =
String.fromCharCode('A'.codeUnitAt(0) + (2 - index));
return OrderedButton<String>(
name: 'String: $order',
order: order,
);
}),
),
),
// A group that orders in widget order, regardless of what the order is set to.
FocusTraversalGroup(
// Note that because this is NOT an OrderedTraversalPolicy, the
// assigned order of these OrderedButtons is ignored, and they
// are traversed in widget order. TRY THIS: change this to
// "OrderedTraversalPolicy()" and see that it now follows the
// numeric order set on them instead of the widget order.
policy: WidgetOrderTraversalPolicy(),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: List<Widget>.generate(3, (int index) {
return OrderedButton<num>(
name: 'ignored num: ${3 - index}',
order: 3 - index,
);
}),
),
),
],
),
),
);
}
}
| flutter/examples/api/lib/widgets/focus_traversal/focus_traversal_group.0.dart/0 | {'file_path': 'flutter/examples/api/lib/widgets/focus_traversal/focus_traversal_group.0.dart', 'repo_id': 'flutter', 'token_count': 2502} |
// 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.
// Flutter code sample for [PageStorage].
import 'package:flutter/material.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return const MaterialApp(
home: MyHomePage(),
);
}
}
class MyHomePage extends StatefulWidget {
const MyHomePage({super.key});
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
final List<Widget> pages = const <Widget>[
ColorBoxPage(
key: PageStorageKey<String>('pageOne'),
),
ColorBoxPage(
key: PageStorageKey<String>('pageTwo'),
),
];
int currentTab = 0;
final PageStorageBucket _bucket = PageStorageBucket();
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('Persistence Example'),
),
body: PageStorage(
bucket: _bucket,
child: pages[currentTab],
),
bottomNavigationBar: BottomNavigationBar(
currentIndex: currentTab,
onTap: (int index) {
setState(() {
currentTab = index;
});
},
items: const <BottomNavigationBarItem>[
BottomNavigationBarItem(
icon: Icon(Icons.home),
label: 'page 1',
),
BottomNavigationBarItem(
icon: Icon(Icons.settings),
label: 'page2',
),
],
),
);
}
}
class ColorBoxPage extends StatelessWidget {
const ColorBoxPage({super.key});
@override
Widget build(BuildContext context) {
return ListView.builder(
itemExtent: 250.0,
itemBuilder: (BuildContext context, int index) => Container(
padding: const EdgeInsets.all(10.0),
child: Material(
color: index.isEven ? Colors.cyan : Colors.deepOrange,
child: Center(
child: Text(index.toString()),
),
),
),
);
}
}
| flutter/examples/api/lib/widgets/page_storage/page_storage.0.dart/0 | {'file_path': 'flutter/examples/api/lib/widgets/page_storage/page_storage.0.dart', 'repo_id': 'flutter', 'token_count': 909} |
// 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:flutter/cupertino.dart';
import 'package:flutter_api_samples/cupertino/form_row/cupertino_form_row.0.dart' as example;
import 'package:flutter_test/flutter_test.dart';
void main() {
testWidgets('Cupertino form section displays cupertino form rows', (WidgetTester tester) async {
await tester.pumpWidget(
const example.CupertinoFormRowApp(),
);
expect(find.byType(CupertinoFormSection), findsOneWidget);
expect(find.byType(CupertinoFormRow), findsNWidgets(4));
expect(find.widgetWithText(CupertinoFormSection, 'Connectivity'), findsOneWidget);
expect(find.widgetWithText(CupertinoFormRow, 'Airplane Mode'), findsOneWidget);
expect(find.widgetWithText(CupertinoFormRow, 'Wi-Fi'), findsOneWidget);
expect(find.widgetWithText(CupertinoFormRow, 'Bluetooth'), findsOneWidget);
expect(find.widgetWithText(CupertinoFormRow, 'Mobile Data'), findsOneWidget);
});
}
| flutter/examples/api/test/cupertino/form_row/cupertino_form_row.0_test.dart/0 | {'file_path': 'flutter/examples/api/test/cupertino/form_row/cupertino_form_row.0_test.dart', 'repo_id': 'flutter', 'token_count': 361} |
// 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:flutter/cupertino.dart';
import 'package:flutter_api_samples/cupertino/slider/cupertino_slider.0.dart' as example;
import 'package:flutter_test/flutter_test.dart';
void main() {
Future<void> dragSlider(WidgetTester tester, Key sliderKey) {
final Offset topLeft = tester.getTopLeft(find.byKey(sliderKey));
const double unit = CupertinoThumbPainter.radius;
const double delta = 3.0 * unit;
return tester.dragFrom(topLeft + const Offset(unit, unit), const Offset(delta, 0.0));
}
testWidgets('Can change value using CupertinoSlider', (WidgetTester tester) async {
await tester.pumpWidget(
const example.CupertinoSliderApp(),
);
// Check for the initial slider value.
expect(find.text('0.0'), findsOneWidget);
await dragSlider(tester, const Key('slider'));
await tester.pumpAndSettle();
// Check for the updated slider value.
expect(find.text('40.0'), findsOneWidget);
});
}
| flutter/examples/api/test/cupertino/slider/cupertino_slider.0_test.dart/0 | {'file_path': 'flutter/examples/api/test/cupertino/slider/cupertino_slider.0_test.dart', 'repo_id': 'flutter', 'token_count': 389} |
// 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:flutter/material.dart';
import 'package:flutter_api_samples/material/app_bar/sliver_app_bar.1.dart' as example;
import 'package:flutter_test/flutter_test.dart';
const Offset _kOffset = Offset(0.0, -200.0);
void main() {
testWidgets('SliverAppbar can be pinned', (WidgetTester tester) async {
await tester.pumpWidget(
const example.AppBarApp(),
);
expect(find.widgetWithText(SliverAppBar, 'SliverAppBar'), findsOneWidget);
expect(tester.getBottomLeft(find.text('SliverAppBar')).dy, 144.0);
await tester.drag(find.text('0'), _kOffset, touchSlopY: 0, warnIfMissed: false);
await tester.pump();
await tester.pump(const Duration(milliseconds: 500));
expect(tester.getBottomLeft(find.text('SliverAppBar')).dy, 40.0);
});
}
| flutter/examples/api/test/material/appbar/sliver_app_bar.1_test.dart/0 | {'file_path': 'flutter/examples/api/test/material/appbar/sliver_app_bar.1_test.dart', 'repo_id': 'flutter', 'token_count': 344} |
// 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:flutter/material.dart';
import 'package:flutter_api_samples/material/menu_anchor/checkbox_menu_button.0.dart' as example;
import 'package:flutter_test/flutter_test.dart';
void main() {
testWidgets('Can open menu and show message', (WidgetTester tester) async {
await tester.pumpWidget(
const example.MenuApp(),
);
await tester.tap(find.byType(TextButton));
await tester.pump();
expect(find.text('Show Message'), findsOneWidget);
expect(find.text(example.MenuApp.kMessage), findsNothing);
await tester.tap(find.text('Show Message'));
await tester.pump();
expect(find.text('Show Message'), findsNothing);
expect(find.text(example.MenuApp.kMessage), findsOneWidget);
});
}
| flutter/examples/api/test/material/menu_anchor/checkbox_menu_button.0_test.dart/0 | {'file_path': 'flutter/examples/api/test/material/menu_anchor/checkbox_menu_button.0_test.dart', 'repo_id': 'flutter', 'token_count': 305} |
// 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:flutter/material.dart';
import 'package:flutter_api_samples/widgets/heroes/hero.1.dart' as example;
import 'package:flutter_test/flutter_test.dart';
void main() {
testWidgets('Hero flight animation with default rect tween', (WidgetTester tester) async {
await tester.pumpWidget(
const example.HeroApp(),
);
expect(find.text('Hero Sample'), findsOneWidget);
await tester.tap(find.byType(ElevatedButton));
await tester.pump();
Size heroSize = tester.getSize(find.byType(Container).first);
expect(heroSize, const Size(50.0, 50.0));
// Jump 25% into the transition (total length = 300ms)
await tester.pump(const Duration(milliseconds: 75)); // 25% of 300ms
heroSize = tester.getSize(find.byType(Container).first);
expect(heroSize.width.roundToDouble(), 171.0);
expect(heroSize.height.roundToDouble(), 73.0);
// Jump to 50% into the transition.
await tester.pump(const Duration(milliseconds: 75)); // 25% of 300ms
heroSize = tester.getSize(find.byType(Container).first);
expect(heroSize.width.roundToDouble(), 371.0);
expect(heroSize.height.roundToDouble(), 273.0);
// Jump to 75% into the transition.
await tester.pump(const Duration(milliseconds: 75)); // 25% of 300ms
heroSize = tester.getSize(find.byType(Container).first);
expect(heroSize.width.roundToDouble(), 398.0);
expect(heroSize.height.roundToDouble(), 376.0);
// Jump to 100% into the transition.
await tester.pump(const Duration(milliseconds: 75)); // 25% of 300ms
heroSize = tester.getSize(find.byType(Container).first);
expect(heroSize, const Size(400.0, 400.0));
expect(find.byIcon(Icons.arrow_back), findsOneWidget);
await tester.tap(find.byIcon(Icons.arrow_back));
await tester.pump();
// Jump 25% into the transition (total length = 300ms)
await tester.pump(const Duration(milliseconds: 75)); // 25% of 300ms
heroSize = tester.getSize(find.byType(Container).first);
expect(heroSize.width.roundToDouble(), 398.0);
expect(heroSize.height.roundToDouble(), 376.0);
// Jump to 50% into the transition.
await tester.pump(const Duration(milliseconds: 75)); // 25% of 300ms
heroSize = tester.getSize(find.byType(Container).first);
expect(heroSize.width.roundToDouble(), 371.0);
expect(heroSize.height.roundToDouble(), 273.0);
// Jump to 75% into the transition.
await tester.pump(const Duration(milliseconds: 75)); // 25% of 300ms
heroSize = tester.getSize(find.byType(Container).first);
expect(heroSize.width.roundToDouble(), 171.0);
expect(heroSize.height.roundToDouble(), 73.0);
// Jump to 100% into the transition.
await tester.pump(const Duration(milliseconds: 75)); // 25% of 300ms
heroSize = tester.getSize(find.byType(Container).first);
expect(heroSize, const Size(50.0, 50.0));
});
testWidgets('Hero flight animation with custom rect tween', (WidgetTester tester) async {
await tester.pumpWidget(
const example.HeroApp(),
);
expect(find.text('Hero Sample'), findsOneWidget);
await tester.tap(find.byType(ElevatedButton));
await tester.pump();
Size heroSize = tester.getSize(find.byType(Container).last);
expect(heroSize, const Size(50.0, 50.0));
// Jump 25% into the transition (total length = 300ms)
await tester.pump(const Duration(milliseconds: 75)); // 25% of 300ms
heroSize = tester.getSize(find.byType(Container).last);
expect(heroSize.width.roundToDouble(), 133.0);
expect(heroSize.height.roundToDouble(), 133.0);
// Jump to 50% into the transition.
await tester.pump(const Duration(milliseconds: 75)); // 25% of 300ms
heroSize = tester.getSize(find.byType(Container).last);
expect(heroSize.width.roundToDouble(), 321.0);
expect(heroSize.height.roundToDouble(), 321.0);
// Jump to 75% into the transition.
await tester.pump(const Duration(milliseconds: 75)); // 25% of 300ms
heroSize = tester.getSize(find.byType(Container).first);
expect(heroSize.width.roundToDouble(), 398.0);
expect(heroSize.height.roundToDouble(), 376.0);
// Jump to 100% into the transition.
await tester.pump(const Duration(milliseconds: 75)); // 25% of 300ms
heroSize = tester.getSize(find.byType(Container).last);
expect(heroSize, const Size(400.0, 400.0));
expect(find.byIcon(Icons.arrow_back), findsOneWidget);
await tester.tap(find.byIcon(Icons.arrow_back));
await tester.pump();
// Jump 25% into the transition (total length = 300ms)
await tester.pump(const Duration(milliseconds: 75)); // 25% of 300ms
heroSize = tester.getSize(find.byType(Container).last);
expect(heroSize.width.roundToDouble(), 386.0);
expect(heroSize.height.roundToDouble(), 386.0);
// Jump to 50% into the transition.
await tester.pump(const Duration(milliseconds: 75)); // 25% of 300ms
heroSize = tester.getSize(find.byType(Container).last);
expect(heroSize.width.roundToDouble(), 321.0);
expect(heroSize.height.roundToDouble(), 321.0);
// Jump to 75% into the transition.
await tester.pump(const Duration(milliseconds: 75)); // 25% of 300ms
heroSize = tester.getSize(find.byType(Container).last);
expect(heroSize.width.roundToDouble(), 133.0);
expect(heroSize.height.roundToDouble(), 133.0);
// Jump to 100% into the transition.
await tester.pump(const Duration(milliseconds: 75)); // 25% of 300ms
heroSize = tester.getSize(find.byType(Container).last);
expect(heroSize, const Size(50.0, 50.0));
});
}
| flutter/examples/api/test/widgets/heroes/hero.1_test.dart/0 | {'file_path': 'flutter/examples/api/test/widgets/heroes/hero.1_test.dart', 'repo_id': 'flutter', 'token_count': 2048} |
// 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.
// This example shows how to show the text 'Hello, world.' using the raw
// interface to the engine.
import 'dart:ui' as ui;
void beginFrame(Duration timeStamp) {
final double devicePixelRatio = ui.window.devicePixelRatio;
final ui.Size logicalSize = ui.window.physicalSize / devicePixelRatio;
final ui.ParagraphBuilder paragraphBuilder = ui.ParagraphBuilder(
ui.ParagraphStyle(textDirection: ui.TextDirection.ltr),
)
..addText('Hello, world.');
final ui.Paragraph paragraph = paragraphBuilder.build()
..layout(ui.ParagraphConstraints(width: logicalSize.width));
final ui.Rect physicalBounds = ui.Offset.zero & (logicalSize * devicePixelRatio);
final ui.PictureRecorder recorder = ui.PictureRecorder();
final ui.Canvas canvas = ui.Canvas(recorder, physicalBounds);
canvas.scale(devicePixelRatio, devicePixelRatio);
canvas.drawParagraph(paragraph, ui.Offset(
(logicalSize.width - paragraph.maxIntrinsicWidth) / 2.0,
(logicalSize.height - paragraph.height) / 2.0,
));
final ui.Picture picture = recorder.endRecording();
final ui.SceneBuilder sceneBuilder = ui.SceneBuilder()
// TODO(abarth): We should be able to add a picture without pushing a
// container layer first.
..pushClipRect(physicalBounds)
..addPicture(ui.Offset.zero, picture)
..pop();
ui.window.render(sceneBuilder.build());
}
// This function is the primary entry point to your application. The engine
// calls main() as soon as it has loaded your code.
void main() {
// The engine calls onBeginFrame whenever it wants us to produce a frame.
ui.PlatformDispatcher.instance.onBeginFrame = beginFrame;
// Here we kick off the whole process by asking the engine to schedule a new
// frame. The engine will eventually call onBeginFrame when it is time for us
// to actually produce the frame.
ui.PlatformDispatcher.instance.scheduleFrame();
}
| flutter/examples/layers/raw/hello_world.dart/0 | {'file_path': 'flutter/examples/layers/raw/hello_world.dart', 'repo_id': 'flutter', 'token_count': 631} |
// 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:flutter/gestures.dart';
import 'package:flutter_test/flutter_test.dart';
import '../rendering/src/sector_layout.dart';
void main() {
group('hit testing', () {
test('SectorHitTestResult wrapping HitTestResult', () {
final HitTestEntry entry1 = HitTestEntry(_DummyHitTestTarget());
final HitTestEntry entry2 = HitTestEntry(_DummyHitTestTarget());
final HitTestEntry entry3 = HitTestEntry(_DummyHitTestTarget());
final HitTestResult wrapped = HitTestResult();
wrapped.add(entry1);
expect(wrapped.path, equals(<HitTestEntry>[entry1]));
final SectorHitTestResult wrapping = SectorHitTestResult.wrap(wrapped);
expect(wrapping.path, equals(<HitTestEntry>[entry1]));
expect(wrapping.path, same(wrapped.path));
wrapping.add(entry2);
expect(wrapping.path, equals(<HitTestEntry>[entry1, entry2]));
expect(wrapped.path, equals(<HitTestEntry>[entry1, entry2]));
wrapped.add(entry3);
expect(wrapping.path, equals(<HitTestEntry>[entry1, entry2, entry3]));
expect(wrapped.path, equals(<HitTestEntry>[entry1, entry2, entry3]));
});
});
}
class _DummyHitTestTarget implements HitTestTarget {
@override
void handleEvent(PointerEvent event, HitTestEntry entry) {
// Nothing to do.
}
}
| flutter/examples/layers/test/sector_layout_test.dart/0 | {'file_path': 'flutter/examples/layers/test/sector_layout_test.dart', 'repo_id': 'flutter', 'token_count': 513} |
targets:
$default:
sources:
exclude:
- "test/examples/sector_layout_test.dart"
| flutter/packages/flutter/build.yaml/0 | {'file_path': 'flutter/packages/flutter/build.yaml', 'repo_id': 'flutter', 'token_count': 48} |
# 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.
# For details regarding the *Flutter Fix* feature, see
# https://flutter.dev/docs/development/tools/flutter-fix
# Please add new fixes to the top of the file, separated by one blank line
# from other fixes. In a comment, include a link to the PR where the change
# requiring the fix was made.
# Every fix must be tested. See the flutter/packages/flutter/test_fixes/README.md
# file for instructions on testing these data driven fixes.
# For documentation about this file format, see
# https://dart.dev/go/data-driven-fixes.
# * Fixes in this file are from the Rendering library. *
version: 1
transforms:
# Changes made in https://github.com/flutter/flutter/pull/66305
- title: "Migrate to 'clipBehavior'"
date: 2020-09-22
element:
uris: [ 'rendering.dart' ]
field: 'overflow'
inClass: 'RenderStack'
changes:
- kind: 'rename'
newName: 'clipBehavior'
# Changes made in https://github.com/flutter/flutter/pull/66305
- title: "Migrate to 'clipBehavior'"
date: 2020-09-22
element:
uris: [ 'rendering.dart' ]
constructor: ''
inClass: 'RenderStack'
oneOf:
- if: "overflow == 'Overflow.clip'"
changes:
- kind: 'addParameter'
index: 0
name: 'clipBehavior'
style: optional_named
argumentValue:
expression: 'Clip.hardEdge'
requiredIf: "overflow == 'Overflow.clip'"
- kind: 'removeParameter'
name: 'overflow'
- if: "overflow == 'Overflow.visible'"
changes:
- kind: 'addParameter'
index: 0
name: 'clipBehavior'
style: optional_named
argumentValue:
expression: 'Clip.none'
requiredIf: "overflow == 'Overflow.visible'"
- kind: 'removeParameter'
name: 'overflow'
variables:
overflow:
kind: 'fragment'
value: 'arguments[overflow]'
# Changes made in https://flutter.dev/docs/release/breaking-changes/clip-behavior
- title: "Migrate to 'clipBehavior'"
date: 2020-08-20
element:
uris: [ 'rendering.dart' ]
field: 'clipToSize'
inClass: 'RenderListWheelViewport'
changes:
- kind: 'rename'
newName: 'clipBehavior'
# Changes made in https://flutter.dev/docs/release/breaking-changes/clip-behavior
- title: "Migrate to 'clipBehavior'"
date: 2020-08-20
element:
uris: [ 'rendering.dart' ]
constructor: ''
inClass: 'RenderListWheelViewport'
oneOf:
- if: "clipToSize == 'true'"
changes:
- kind: 'addParameter'
index: 13
name: 'clipBehavior'
style: optional_named
argumentValue:
expression: 'Clip.hardEdge'
requiredIf: "clipToSize == 'true'"
- kind: 'removeParameter'
name: 'clipToSize'
- if: "clipToSize == 'false'"
changes:
- kind: 'addParameter'
index: 13
name: 'clipBehavior'
style: optional_named
argumentValue:
expression: 'Clip.none'
requiredIf: "clipToSize == 'false'"
- kind: 'removeParameter'
name: 'clipToSize'
variables:
clipToSize:
kind: 'fragment'
value: 'arguments[clipToSize]'
# Before adding a new fix: read instructions at the top of this file.
| flutter/packages/flutter/lib/fix_data/fix_rendering.yaml/0 | {'file_path': 'flutter/packages/flutter/lib/fix_data/fix_rendering.yaml', 'repo_id': 'flutter', 'token_count': 1534} |
// 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.
/// Platform services exposed to Flutter apps.
///
/// To use, import `package:flutter/services.dart`.
///
/// This library depends only on core Dart libraries and the `foundation`
/// library.
library services;
export 'src/services/asset_bundle.dart';
export 'src/services/asset_manifest.dart';
export 'src/services/autofill.dart';
export 'src/services/binary_messenger.dart';
export 'src/services/binding.dart';
export 'src/services/browser_context_menu.dart';
export 'src/services/clipboard.dart';
export 'src/services/debug.dart';
export 'src/services/deferred_component.dart';
export 'src/services/font_loader.dart';
export 'src/services/haptic_feedback.dart';
export 'src/services/hardware_keyboard.dart';
export 'src/services/keyboard_inserted_content.dart';
export 'src/services/keyboard_key.g.dart';
export 'src/services/keyboard_maps.g.dart';
export 'src/services/message_codec.dart';
export 'src/services/message_codecs.dart';
export 'src/services/mouse_cursor.dart';
export 'src/services/mouse_tracking.dart';
export 'src/services/platform_channel.dart';
export 'src/services/platform_views.dart';
export 'src/services/raw_keyboard.dart';
export 'src/services/raw_keyboard_android.dart';
export 'src/services/raw_keyboard_fuchsia.dart';
export 'src/services/raw_keyboard_ios.dart';
export 'src/services/raw_keyboard_linux.dart';
export 'src/services/raw_keyboard_macos.dart';
export 'src/services/raw_keyboard_web.dart';
export 'src/services/raw_keyboard_windows.dart';
export 'src/services/restoration.dart';
export 'src/services/service_extensions.dart';
export 'src/services/spell_check.dart';
export 'src/services/system_channels.dart';
export 'src/services/system_chrome.dart';
export 'src/services/system_navigator.dart';
export 'src/services/system_sound.dart';
export 'src/services/text_boundary.dart';
export 'src/services/text_editing.dart';
export 'src/services/text_editing_delta.dart';
export 'src/services/text_formatter.dart';
export 'src/services/text_input.dart';
export 'src/services/text_layout_metrics.dart';
| flutter/packages/flutter/lib/services.dart/0 | {'file_path': 'flutter/packages/flutter/lib/services.dart', 'repo_id': 'flutter', 'token_count': 743} |
// 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:flutter/foundation.dart';
import 'package:flutter/widgets.dart';
import 'colors.dart';
/// A button in a _ContextMenuSheet.
///
/// A typical use case is to pass a [Text] as the [child] here, but be sure to
/// use [TextOverflow.ellipsis] for the [Text.overflow] field if the text may be
/// long, as without it the text will wrap to the next line.
class CupertinoContextMenuAction extends StatefulWidget {
/// Construct a CupertinoContextMenuAction.
const CupertinoContextMenuAction({
super.key,
required this.child,
this.isDefaultAction = false,
this.isDestructiveAction = false,
this.onPressed,
this.trailingIcon,
});
/// The widget that will be placed inside the action.
final Widget child;
/// Indicates whether this action should receive the style of an emphasized,
/// default action.
final bool isDefaultAction;
/// Indicates whether this action should receive the style of a destructive
/// action.
final bool isDestructiveAction;
/// Called when the action is pressed.
final VoidCallback? onPressed;
/// An optional icon to display to the right of the child.
///
/// Will be colored in the same way as the [TextStyle] used for [child] (for
/// example, if using [isDestructiveAction]).
final IconData? trailingIcon;
@override
State<CupertinoContextMenuAction> createState() => _CupertinoContextMenuActionState();
}
class _CupertinoContextMenuActionState extends State<CupertinoContextMenuAction> {
static const Color _kBackgroundColor = CupertinoDynamicColor.withBrightness(
color: Color(0xFFEEEEEE),
darkColor: Color(0xFF212122),
);
static const Color _kBackgroundColorPressed = CupertinoDynamicColor.withBrightness(
color: Color(0xFFDDDDDD),
darkColor: Color(0xFF3F3F40),
);
static const double _kButtonHeight = 56.0;
static const TextStyle _kActionSheetActionStyle = TextStyle(
fontFamily: '.SF UI Text',
inherit: false,
fontSize: 20.0,
fontWeight: FontWeight.w400,
color: CupertinoColors.black,
textBaseline: TextBaseline.alphabetic,
);
final GlobalKey _globalKey = GlobalKey();
bool _isPressed = false;
void onTapDown(TapDownDetails details) {
setState(() {
_isPressed = true;
});
}
void onTapUp(TapUpDetails details) {
setState(() {
_isPressed = false;
});
}
void onTapCancel() {
setState(() {
_isPressed = false;
});
}
TextStyle get _textStyle {
if (widget.isDefaultAction) {
return _kActionSheetActionStyle.copyWith(
fontWeight: FontWeight.w600,
);
}
if (widget.isDestructiveAction) {
return _kActionSheetActionStyle.copyWith(
color: CupertinoColors.destructiveRed,
);
}
return _kActionSheetActionStyle.copyWith(
color: CupertinoDynamicColor.resolve(CupertinoColors.label, context)
);
}
@override
Widget build(BuildContext context) {
return MouseRegion(
cursor: widget.onPressed != null && kIsWeb ? SystemMouseCursors.click : MouseCursor.defer,
child: GestureDetector(
key: _globalKey,
onTapDown: onTapDown,
onTapUp: onTapUp,
onTapCancel: onTapCancel,
onTap: widget.onPressed,
behavior: HitTestBehavior.opaque,
child: ConstrainedBox(
constraints: const BoxConstraints(
minHeight: _kButtonHeight,
),
child: Semantics(
button: true,
child: Container(
decoration: BoxDecoration(
color: _isPressed
? CupertinoDynamicColor.resolve(_kBackgroundColorPressed, context)
: CupertinoDynamicColor.resolve(_kBackgroundColor, context),
),
padding: const EdgeInsets.symmetric(
vertical: 16.0,
horizontal: 10.0,
),
child: DefaultTextStyle(
style: _textStyle,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Flexible(
child: widget.child,
),
if (widget.trailingIcon != null)
Icon(
widget.trailingIcon,
color: _textStyle.color,
),
],
),
),
),
),
),
),
);
}
}
| flutter/packages/flutter/lib/src/cupertino/context_menu_action.dart/0 | {'file_path': 'flutter/packages/flutter/lib/src/cupertino/context_menu_action.dart', 'repo_id': 'flutter', 'token_count': 1949} |
// 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:meta/meta.dart';
// This file gets mutated by //dev/devicelab/bin/tasks/flutter_test_performance.dart
// during device lab performance tests. When editing this file, check to make sure
// that it didn't break that test.
/// An abstract node in a tree.
///
/// AbstractNode has as notion of depth, attachment, and parent, but does not
/// have a model for children.
///
/// When a subclass is changing the parent of a child, it should call either
/// `parent.adoptChild(child)` or `parent.dropChild(child)` as appropriate.
/// Subclasses can expose an API for manipulating the tree if desired (e.g. a
/// setter for a `child` property, or an `add()` method to manipulate a list).
///
/// The current parent node is exposed by the [parent] property.
///
/// The current attachment state is exposed by [attached]. The root of any tree
/// that is to be considered attached should be manually attached by calling
/// [attach]. Other than that, the [attach] and [detach] methods should not be
/// called directly; attachment is managed automatically by the aforementioned
/// [adoptChild] and [dropChild] methods.
///
/// Subclasses that have children must override [attach] and [detach] as
/// described in the documentation for those methods.
///
/// Nodes always have a [depth] greater than their ancestors'. There's no
/// guarantee regarding depth between siblings. The depth of a node is used to
/// ensure that nodes are processed in depth order. The [depth] of a child can
/// be more than one greater than the [depth] of the parent, because the [depth]
/// values are never decreased: all that matters is that it's greater than the
/// parent. Consider a tree with a root node A, a child B, and a grandchild C.
/// Initially, A will have [depth] 0, B [depth] 1, and C [depth] 2. If C is
/// moved to be a child of A, sibling of B, then the numbers won't change. C's
/// [depth] will still be 2. The [depth] is automatically maintained by the
/// [adoptChild] and [dropChild] methods.
class AbstractNode {
/// The depth of this node in the tree.
///
/// The depth of nodes in a tree monotonically increases as you traverse down
/// the tree.
int get depth => _depth;
int _depth = 0;
/// Adjust the [depth] of the given [child] to be greater than this node's own
/// [depth].
///
/// Only call this method from overrides of [redepthChildren].
@protected
void redepthChild(AbstractNode child) {
assert(child.owner == owner);
if (child._depth <= _depth) {
child._depth = _depth + 1;
child.redepthChildren();
}
}
/// Adjust the [depth] of this node's children, if any.
///
/// Override this method in subclasses with child nodes to call [redepthChild]
/// for each child. Do not call this method directly.
void redepthChildren() { }
/// The owner for this node (null if unattached).
///
/// The entire subtree that this node belongs to will have the same owner.
Object? get owner => _owner;
Object? _owner;
/// Whether this node is in a tree whose root is attached to something.
///
/// This becomes true during the call to [attach].
///
/// This becomes false during the call to [detach].
bool get attached => _owner != null;
/// Mark this node as attached to the given owner.
///
/// Typically called only from the [parent]'s [attach] method, and by the
/// [owner] to mark the root of a tree as attached.
///
/// Subclasses with children should override this method to first call their
/// inherited [attach] method, and then [attach] all their children to the
/// same [owner].
///
/// Implementations of this method should start with a call to the inherited
/// method, as in `super.attach(owner)`.
@mustCallSuper
void attach(covariant Object owner) {
assert(_owner == null);
_owner = owner;
}
/// Mark this node as detached.
///
/// Typically called only from the [parent]'s [detach], and by the [owner] to
/// mark the root of a tree as detached.
///
/// Subclasses with children should override this method to first call their
/// inherited [detach] method, and then [detach] all their children.
///
/// Implementations of this method should end with a call to the inherited
/// method, as in `super.detach()`.
@mustCallSuper
void detach() {
assert(_owner != null);
_owner = null;
assert(parent == null || attached == parent!.attached);
}
/// The parent of this node in the tree.
AbstractNode? get parent => _parent;
AbstractNode? _parent;
/// Mark the given node as being a child of this node.
///
/// Subclasses should call this function when they acquire a new child.
@protected
@mustCallSuper
void adoptChild(covariant AbstractNode child) {
assert(child._parent == null);
assert(() {
AbstractNode node = this;
while (node.parent != null) {
node = node.parent!;
}
assert(node != child); // indicates we are about to create a cycle
return true;
}());
child._parent = this;
if (attached) {
child.attach(_owner!);
}
redepthChild(child);
}
/// Disconnect the given node from this node.
///
/// Subclasses should call this function when they lose a child.
@protected
@mustCallSuper
void dropChild(covariant AbstractNode child) {
assert(child._parent == this);
assert(child.attached == attached);
child._parent = null;
if (attached) {
child.detach();
}
}
}
| flutter/packages/flutter/lib/src/foundation/node.dart/0 | {'file_path': 'flutter/packages/flutter/lib/src/foundation/node.dart', 'repo_id': 'flutter', 'token_count': 1639} |
// 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 'drag_details.dart';
export 'drag_details.dart' show DragEndDetails, DragUpdateDetails;
/// Interface for objects that receive updates about drags.
///
/// This interface is used in various ways. For example,
/// [MultiDragGestureRecognizer] uses it to update its clients when it
/// recognizes a gesture. Similarly, the scrolling infrastructure in the widgets
/// library uses it to notify the [DragScrollActivity] when the user drags the
/// scrollable.
abstract class Drag {
/// The pointer has moved.
void update(DragUpdateDetails details) { }
/// The pointer is no longer in contact with the screen.
///
/// The velocity at which the pointer was moving when it stopped contacting
/// the screen is available in the `details`.
void end(DragEndDetails details) { }
/// The input from the pointer is no longer directed towards this receiver.
///
/// For example, the user might have been interrupted by a system-modal dialog
/// in the middle of the drag.
void cancel() { }
}
| flutter/packages/flutter/lib/src/gestures/drag.dart/0 | {'file_path': 'flutter/packages/flutter/lib/src/gestures/drag.dart', 'repo_id': 'flutter', 'token_count': 299} |
// 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.
// AUTOGENERATED FILE DO NOT EDIT!
// This file was generated by vitool.
part of material_animated_icons; // ignore: use_string_in_part_of_directives
const _AnimatedIconData _$list_view = _AnimatedIconData(
Size(48.0, 48.0),
<_PathFrames>[
_PathFrames(
opacities: <double>[
1.0,
1.0,
1.0,
1.0,
1.0,
0.878048780488,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
],
commands: <_PathCommand>[
_PathMoveTo(
<Offset>[
Offset(3.3000000000000016, 35.5),
Offset(3.1872491552817053, 35.294662556963694),
Offset(2.803584610041825, 34.55708172822131),
Offset(2.086762034690722, 32.974965285488736),
Offset(1.0562543947134673, 29.85871467131613),
Offset(0.3277056784121384, 23.397935591386524),
Offset(5.068384450186188, 9.77558673709007),
Offset(19.142440865906075, 0.8236301535641601),
Offset(28.4986244695124, 0.7512929847205392),
Offset(34.03339705415398, 2.550735594111994),
Offset(37.52630261515188, 4.563458703685585),
Offset(39.83951862260312, 6.397453314812415),
Offset(41.420680465862844, 7.960676694252207),
Offset(42.52292959864048, 9.247336542718527),
Offset(43.29857028685616, 10.277566364406328),
Offset(43.843675623946226, 11.078369385731442),
Offset(44.22049532021145, 11.67638165937833),
Offset(44.47040673191611, 12.096116254351111),
Offset(44.62108022189184, 12.359078623996243),
Offset(44.69110902782625, 12.484010802427473),
],
),
_PathCubicTo(
<Offset>[
Offset(3.3000000000000016, 35.5),
Offset(3.1872491552817053, 35.294662556963694),
Offset(2.803584610041825, 34.55708172822131),
Offset(2.086762034690722, 32.974965285488736),
Offset(1.0562543947134673, 29.85871467131613),
Offset(0.3277056784121384, 23.397935591386524),
Offset(5.068384450186188, 9.77558673709007),
Offset(19.142440865906075, 0.8236301535641601),
Offset(28.4986244695124, 0.7512929847205392),
Offset(34.03339705415398, 2.550735594111994),
Offset(37.52630261515188, 4.563458703685585),
Offset(39.83951862260312, 6.397453314812415),
Offset(41.420680465862844, 7.960676694252207),
Offset(42.52292959864048, 9.247336542718527),
Offset(43.29857028685616, 10.277566364406328),
Offset(43.843675623946226, 11.078369385731442),
Offset(44.22049532021145, 11.67638165937833),
Offset(44.47040673191611, 12.096116254351111),
Offset(44.62108022189184, 12.359078623996243),
Offset(44.69110902782625, 12.484010802427473),
],
<Offset>[
Offset(7.900000000000001, 35.5),
Offset(7.787024068249312, 35.34016805150932),
Offset(7.398927009112204, 34.7640315658779),
Offset(6.654572753845953, 33.51820117713304),
Offset(5.505071070263646, 31.02834289744042),
Offset(4.290730713340881, 25.733408257149932),
Offset(6.941261311200804, 13.977054607189284),
Offset(17.78085941259789, 5.217500423156466),
Offset(25.541432860040533, 4.274788093964937),
Offset(30.30609713874217, 5.246516620191658),
Offset(33.39574733179454, 6.587937167668043),
Offset(35.489171433369805, 7.892270806391144),
Offset(36.94930799941936, 9.040874947505337),
Offset(37.985765755731585, 10.005059620498354),
Offset(38.72688536686231, 10.787171105652785),
Offset(39.254973101552665, 11.400563676461365),
Offset(39.62422079973953, 11.861477668143195),
Offset(39.87129202785027, 12.186360028903175),
Offset(40.02118722421174, 12.390453931063687),
Offset(40.091110400688535, 12.487564720144858),
],
<Offset>[
Offset(7.900000000000001, 35.5),
Offset(7.787024068249312, 35.34016805150932),
Offset(7.398927009112204, 34.7640315658779),
Offset(6.654572753845953, 33.51820117713304),
Offset(5.505071070263646, 31.02834289744042),
Offset(4.290730713340881, 25.733408257149932),
Offset(6.941261311200804, 13.977054607189284),
Offset(17.78085941259789, 5.217500423156466),
Offset(25.541432860040533, 4.274788093964937),
Offset(30.30609713874217, 5.246516620191658),
Offset(33.39574733179454, 6.587937167668043),
Offset(35.489171433369805, 7.892270806391144),
Offset(36.94930799941936, 9.040874947505337),
Offset(37.985765755731585, 10.005059620498354),
Offset(38.72688536686231, 10.787171105652785),
Offset(39.254973101552665, 11.400563676461365),
Offset(39.62422079973953, 11.861477668143195),
Offset(39.87129202785027, 12.186360028903175),
Offset(40.02118722421174, 12.390453931063687),
Offset(40.091110400688535, 12.487564720144858),
],
),
_PathCubicTo(
<Offset>[
Offset(7.900000000000001, 35.5),
Offset(7.787024068249312, 35.34016805150932),
Offset(7.398927009112204, 34.7640315658779),
Offset(6.654572753845953, 33.51820117713304),
Offset(5.505071070263646, 31.02834289744042),
Offset(4.290730713340881, 25.733408257149932),
Offset(6.941261311200804, 13.977054607189284),
Offset(17.78085941259789, 5.217500423156466),
Offset(25.541432860040533, 4.274788093964937),
Offset(30.30609713874217, 5.246516620191658),
Offset(33.39574733179454, 6.587937167668043),
Offset(35.489171433369805, 7.892270806391144),
Offset(36.94930799941936, 9.040874947505337),
Offset(37.985765755731585, 10.005059620498354),
Offset(38.72688536686231, 10.787171105652785),
Offset(39.254973101552665, 11.400563676461365),
Offset(39.62422079973953, 11.861477668143195),
Offset(39.87129202785027, 12.186360028903175),
Offset(40.02118722421174, 12.390453931063687),
Offset(40.091110400688535, 12.487564720144858),
],
<Offset>[
Offset(7.900000000000001, 30.900000000000002),
Offset(7.832529562794939, 30.740393138541712),
Offset(7.605876846768791, 30.168689166807518),
Offset(7.19780864549025, 28.950390457977804),
Offset(6.674699296387938, 26.57952622189024),
Offset(6.626203379104288, 21.770383222221188),
Offset(11.14272918130002, 12.104177746174667),
Offset(22.174729682190197, 6.579081876464652),
Offset(29.06492796928493, 7.231979703436803),
Offset(33.00187816482183, 8.973816535603465),
Offset(35.420225795777, 10.718492451025382),
Offset(36.983988924948534, 12.242617995624466),
Offset(38.02950625267249, 13.51224741394882),
Offset(38.743488833511414, 14.542223463407256),
Offset(39.23649010810877, 15.358856025646629),
Offset(39.57716739228259, 15.989266198854928),
Offset(39.8093168085044, 16.457752188615107),
Offset(39.96153580240233, 16.785474732969014),
Offset(40.052562531279186, 16.990346928743786),
Offset(40.094664318405925, 17.087563347282572),
],
<Offset>[
Offset(7.900000000000001, 30.900000000000002),
Offset(7.832529562794939, 30.740393138541712),
Offset(7.605876846768791, 30.168689166807518),
Offset(7.19780864549025, 28.950390457977804),
Offset(6.674699296387938, 26.57952622189024),
Offset(6.626203379104288, 21.770383222221188),
Offset(11.14272918130002, 12.104177746174667),
Offset(22.174729682190197, 6.579081876464652),
Offset(29.06492796928493, 7.231979703436803),
Offset(33.00187816482183, 8.973816535603465),
Offset(35.420225795777, 10.718492451025382),
Offset(36.983988924948534, 12.242617995624466),
Offset(38.02950625267249, 13.51224741394882),
Offset(38.743488833511414, 14.542223463407256),
Offset(39.23649010810877, 15.358856025646629),
Offset(39.57716739228259, 15.989266198854928),
Offset(39.8093168085044, 16.457752188615107),
Offset(39.96153580240233, 16.785474732969014),
Offset(40.052562531279186, 16.990346928743786),
Offset(40.094664318405925, 17.087563347282572),
],
),
_PathCubicTo(
<Offset>[
Offset(7.900000000000001, 30.900000000000002),
Offset(7.832529562794939, 30.740393138541712),
Offset(7.605876846768791, 30.168689166807518),
Offset(7.19780864549025, 28.950390457977804),
Offset(6.674699296387938, 26.57952622189024),
Offset(6.626203379104288, 21.770383222221188),
Offset(11.14272918130002, 12.104177746174667),
Offset(22.174729682190197, 6.579081876464652),
Offset(29.06492796928493, 7.231979703436803),
Offset(33.00187816482183, 8.973816535603465),
Offset(35.420225795777, 10.718492451025382),
Offset(36.983988924948534, 12.242617995624466),
Offset(38.02950625267249, 13.51224741394882),
Offset(38.743488833511414, 14.542223463407256),
Offset(39.23649010810877, 15.358856025646629),
Offset(39.57716739228259, 15.989266198854928),
Offset(39.8093168085044, 16.457752188615107),
Offset(39.96153580240233, 16.785474732969014),
Offset(40.052562531279186, 16.990346928743786),
Offset(40.094664318405925, 17.087563347282572),
],
<Offset>[
Offset(3.3000000000000016, 30.900000000000002),
Offset(3.2327546498273323, 30.694887643996086),
Offset(3.0105344476984124, 29.96173932915093),
Offset(2.6299979263350193, 28.407154566333507),
Offset(2.2258826208377593, 25.40989799576595),
Offset(2.663178344175545, 19.43491055645778),
Offset(9.269852320285402, 7.902709876075453),
Offset(23.53631113549838, 2.185211606872347),
Offset(32.0221195787568, 3.708484594192405),
Offset(36.729178080233645, 6.278035509523802),
Offset(39.55078107913434, 8.694013987042924),
Offset(41.33433611418185, 10.747800504045737),
Offset(42.500878719115974, 12.43204916069569),
Offset(43.28065267642031, 13.784500385627428),
Offset(43.80817502810262, 14.849251284400172),
Offset(44.16586991467615, 15.667071908125004),
Offset(44.405591328976314, 16.272656179850244),
Offset(44.56065050646817, 16.695230958416946),
Offset(44.65245552895929, 16.95897162167634),
Offset(44.69466294554364, 17.084009429565185),
],
<Offset>[
Offset(3.3000000000000016, 30.900000000000002),
Offset(3.2327546498273323, 30.694887643996086),
Offset(3.0105344476984124, 29.96173932915093),
Offset(2.6299979263350193, 28.407154566333507),
Offset(2.2258826208377593, 25.40989799576595),
Offset(2.663178344175545, 19.43491055645778),
Offset(9.269852320285402, 7.902709876075453),
Offset(23.53631113549838, 2.185211606872347),
Offset(32.0221195787568, 3.708484594192405),
Offset(36.729178080233645, 6.278035509523802),
Offset(39.55078107913434, 8.694013987042924),
Offset(41.33433611418185, 10.747800504045737),
Offset(42.500878719115974, 12.43204916069569),
Offset(43.28065267642031, 13.784500385627428),
Offset(43.80817502810262, 14.849251284400172),
Offset(44.16586991467615, 15.667071908125004),
Offset(44.405591328976314, 16.272656179850244),
Offset(44.56065050646817, 16.695230958416946),
Offset(44.65245552895929, 16.95897162167634),
Offset(44.69466294554364, 17.084009429565185),
],
),
_PathCubicTo(
<Offset>[
Offset(3.3000000000000016, 30.900000000000002),
Offset(3.2327546498273323, 30.694887643996086),
Offset(3.0105344476984124, 29.96173932915093),
Offset(2.6299979263350193, 28.407154566333507),
Offset(2.2258826208377593, 25.40989799576595),
Offset(2.663178344175545, 19.43491055645778),
Offset(9.269852320285402, 7.902709876075453),
Offset(23.53631113549838, 2.185211606872347),
Offset(32.0221195787568, 3.708484594192405),
Offset(36.729178080233645, 6.278035509523802),
Offset(39.55078107913434, 8.694013987042924),
Offset(41.33433611418185, 10.747800504045737),
Offset(42.500878719115974, 12.43204916069569),
Offset(43.28065267642031, 13.784500385627428),
Offset(43.80817502810262, 14.849251284400172),
Offset(44.16586991467615, 15.667071908125004),
Offset(44.405591328976314, 16.272656179850244),
Offset(44.56065050646817, 16.695230958416946),
Offset(44.65245552895929, 16.95897162167634),
Offset(44.69466294554364, 17.084009429565185),
],
<Offset>[
Offset(3.3000000000000016, 35.5),
Offset(3.1872491552817053, 35.294662556963694),
Offset(2.803584610041825, 34.55708172822131),
Offset(2.086762034690722, 32.974965285488736),
Offset(1.0562543947134673, 29.85871467131613),
Offset(0.3277056784121384, 23.397935591386524),
Offset(5.068384450186188, 9.77558673709007),
Offset(19.142440865906075, 0.8236301535641601),
Offset(28.4986244695124, 0.7512929847205392),
Offset(34.03339705415398, 2.550735594111994),
Offset(37.52630261515188, 4.563458703685585),
Offset(39.83951862260312, 6.397453314812415),
Offset(41.420680465862844, 7.960676694252207),
Offset(42.52292959864048, 9.247336542718527),
Offset(43.29857028685616, 10.277566364406328),
Offset(43.843675623946226, 11.078369385731442),
Offset(44.22049532021145, 11.67638165937833),
Offset(44.47040673191611, 12.096116254351111),
Offset(44.62108022189184, 12.359078623996243),
Offset(44.69110902782625, 12.484010802427473),
],
<Offset>[
Offset(3.3000000000000016, 35.5),
Offset(3.1872491552817053, 35.294662556963694),
Offset(2.803584610041825, 34.55708172822131),
Offset(2.086762034690722, 32.974965285488736),
Offset(1.0562543947134673, 29.85871467131613),
Offset(0.3277056784121384, 23.397935591386524),
Offset(5.068384450186188, 9.77558673709007),
Offset(19.142440865906075, 0.8236301535641601),
Offset(28.4986244695124, 0.7512929847205392),
Offset(34.03339705415398, 2.550735594111994),
Offset(37.52630261515188, 4.563458703685585),
Offset(39.83951862260312, 6.397453314812415),
Offset(41.420680465862844, 7.960676694252207),
Offset(42.52292959864048, 9.247336542718527),
Offset(43.29857028685616, 10.277566364406328),
Offset(43.843675623946226, 11.078369385731442),
Offset(44.22049532021145, 11.67638165937833),
Offset(44.47040673191611, 12.096116254351111),
Offset(44.62108022189184, 12.359078623996243),
Offset(44.69110902782625, 12.484010802427473),
],
),
_PathClose(
),
],
),
_PathFrames(
opacities: <double>[
1.0,
1.0,
1.0,
1.0,
1.0,
0.878048780488,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
],
commands: <_PathCommand>[
_PathMoveTo(
<Offset>[
Offset(3.3000000000000016, 17.1),
Offset(3.3692711334642134, 16.89556290509327),
Offset(3.631383960668174, 16.17571213193979),
Offset(4.25970560126791, 14.703722408867815),
Offset(5.734767299210637, 12.063447969115414),
Offset(9.669596341465768, 7.545835451671554),
Offset(21.874255930583047, 2.2840792930316054),
Offset(36.7179219442753, 6.269955966796905),
Offset(42.592604906489996, 12.580059422608004),
Offset(44.81652115847264, 17.459935255759223),
Offset(45.624216471081716, 21.085679837114938),
Offset(45.81878858891804, 23.798842071745703),
Offset(45.74147347887537, 25.84616656002614),
Offset(45.55382190975979, 27.395991914354134),
Offset(45.33698925184199, 28.564306044381702),
Offset(45.13245278686591, 29.433179475305685),
Offset(44.960879355270905, 30.061479741265988),
Offset(44.831381830124364, 30.492575070614457),
Offset(44.74658145016162, 30.758650614716647),
Offset(44.7053246986958, 30.884005310978335),
],
),
_PathCubicTo(
<Offset>[
Offset(3.3000000000000016, 17.1),
Offset(3.3692711334642134, 16.89556290509327),
Offset(3.631383960668174, 16.17571213193979),
Offset(4.25970560126791, 14.703722408867815),
Offset(5.734767299210637, 12.063447969115414),
Offset(9.669596341465768, 7.545835451671554),
Offset(21.874255930583047, 2.2840792930316054),
Offset(36.7179219442753, 6.269955966796905),
Offset(42.592604906489996, 12.580059422608004),
Offset(44.81652115847264, 17.459935255759223),
Offset(45.624216471081716, 21.085679837114938),
Offset(45.81878858891804, 23.798842071745703),
Offset(45.74147347887537, 25.84616656002614),
Offset(45.55382190975979, 27.395991914354134),
Offset(45.33698925184199, 28.564306044381702),
Offset(45.13245278686591, 29.433179475305685),
Offset(44.960879355270905, 30.061479741265988),
Offset(44.831381830124364, 30.492575070614457),
Offset(44.74658145016162, 30.758650614716647),
Offset(44.7053246986958, 30.884005310978335),
],
<Offset>[
Offset(7.900000000000001, 17.1),
Offset(7.96904604643182, 16.941068399638898),
Offset(8.226726359738553, 16.382661969596377),
Offset(8.82751632042314, 15.246958300512112),
Offset(10.183583974760815, 13.233076195239708),
Offset(13.63262137639451, 9.88130811743496),
Offset(23.747132791597664, 6.48554716313082),
Offset(35.35634049096711, 10.66382623638921),
Offset(39.63541329701813, 16.103554531852403),
Offset(41.08922124306083, 20.155716281838888),
Offset(41.49366118772438, 23.1101583010974),
Offset(41.46844139968472, 25.293659563324432),
Offset(41.27010101243189, 26.92636481327927),
Offset(41.016658066850894, 28.15371499213396),
Offset(40.76530433184814, 29.07391078562816),
Offset(40.54375026447235, 29.75537376603561),
Offset(40.36460483479899, 30.24657575003085),
Offset(40.232267126058524, 30.582818845166525),
Offset(40.14668845248152, 30.790025921784093),
Offset(40.10532607155808, 30.88755922869572),
],
<Offset>[
Offset(7.900000000000001, 17.1),
Offset(7.96904604643182, 16.941068399638898),
Offset(8.226726359738553, 16.382661969596377),
Offset(8.82751632042314, 15.246958300512112),
Offset(10.183583974760815, 13.233076195239708),
Offset(13.63262137639451, 9.88130811743496),
Offset(23.747132791597664, 6.48554716313082),
Offset(35.35634049096711, 10.66382623638921),
Offset(39.63541329701813, 16.103554531852403),
Offset(41.08922124306083, 20.155716281838888),
Offset(41.49366118772438, 23.1101583010974),
Offset(41.46844139968472, 25.293659563324432),
Offset(41.27010101243189, 26.92636481327927),
Offset(41.016658066850894, 28.15371499213396),
Offset(40.76530433184814, 29.07391078562816),
Offset(40.54375026447235, 29.75537376603561),
Offset(40.36460483479899, 30.24657575003085),
Offset(40.232267126058524, 30.582818845166525),
Offset(40.14668845248152, 30.790025921784093),
Offset(40.10532607155808, 30.88755922869572),
],
),
_PathCubicTo(
<Offset>[
Offset(7.900000000000001, 17.1),
Offset(7.96904604643182, 16.941068399638898),
Offset(8.226726359738553, 16.382661969596377),
Offset(8.82751632042314, 15.246958300512112),
Offset(10.183583974760815, 13.233076195239708),
Offset(13.63262137639451, 9.88130811743496),
Offset(23.747132791597664, 6.48554716313082),
Offset(35.35634049096711, 10.66382623638921),
Offset(39.63541329701813, 16.103554531852403),
Offset(41.08922124306083, 20.155716281838888),
Offset(41.49366118772438, 23.1101583010974),
Offset(41.46844139968472, 25.293659563324432),
Offset(41.27010101243189, 26.92636481327927),
Offset(41.016658066850894, 28.15371499213396),
Offset(40.76530433184814, 29.07391078562816),
Offset(40.54375026447235, 29.75537376603561),
Offset(40.36460483479899, 30.24657575003085),
Offset(40.232267126058524, 30.582818845166525),
Offset(40.14668845248152, 30.790025921784093),
Offset(40.10532607155808, 30.88755922869572),
],
<Offset>[
Offset(7.900000000000001, 12.5),
Offset(8.014551540977447, 12.34129348667129),
Offset(8.43367619739514, 11.787319570526),
Offset(9.370752212067437, 10.679147581356883),
Offset(11.353212200885107, 8.78425951968953),
Offset(15.968094042157917, 5.918283082506218),
Offset(27.94860066169688, 4.6126703021162045),
Offset(39.75021076055942, 12.025407689697397),
Offset(43.158908406262526, 19.060746141324266),
Offset(43.78500226914049, 23.883016197250694),
Offset(43.51813965170684, 27.24071358445474),
Offset(42.96325889126345, 29.644006752557758),
Offset(42.35029926568502, 31.397737279722755),
Offset(41.77438114463072, 32.69087883504286),
Offset(41.2749090730946, 33.64559570562201),
Offset(40.865944555202276, 34.34407628842917),
Offset(40.549700843563855, 34.842850270502765),
Offset(40.32251090061059, 35.18193354923236),
Offset(40.17806375954897, 35.38991891946419),
Offset(40.10887998927547, 35.48755785583344),
],
<Offset>[
Offset(7.900000000000001, 12.5),
Offset(8.014551540977447, 12.34129348667129),
Offset(8.43367619739514, 11.787319570526),
Offset(9.370752212067437, 10.679147581356883),
Offset(11.353212200885107, 8.78425951968953),
Offset(15.968094042157917, 5.918283082506218),
Offset(27.94860066169688, 4.6126703021162045),
Offset(39.75021076055942, 12.025407689697397),
Offset(43.158908406262526, 19.060746141324266),
Offset(43.78500226914049, 23.883016197250694),
Offset(43.51813965170684, 27.24071358445474),
Offset(42.96325889126345, 29.644006752557758),
Offset(42.35029926568502, 31.397737279722755),
Offset(41.77438114463072, 32.69087883504286),
Offset(41.2749090730946, 33.64559570562201),
Offset(40.865944555202276, 34.34407628842917),
Offset(40.549700843563855, 34.842850270502765),
Offset(40.32251090061059, 35.18193354923236),
Offset(40.17806375954897, 35.38991891946419),
Offset(40.10887998927547, 35.48755785583344),
],
),
_PathCubicTo(
<Offset>[
Offset(7.900000000000001, 12.5),
Offset(8.014551540977447, 12.34129348667129),
Offset(8.43367619739514, 11.787319570526),
Offset(9.370752212067437, 10.679147581356883),
Offset(11.353212200885107, 8.78425951968953),
Offset(15.968094042157917, 5.918283082506218),
Offset(27.94860066169688, 4.6126703021162045),
Offset(39.75021076055942, 12.025407689697397),
Offset(43.158908406262526, 19.060746141324266),
Offset(43.78500226914049, 23.883016197250694),
Offset(43.51813965170684, 27.24071358445474),
Offset(42.96325889126345, 29.644006752557758),
Offset(42.35029926568502, 31.397737279722755),
Offset(41.77438114463072, 32.69087883504286),
Offset(41.2749090730946, 33.64559570562201),
Offset(40.865944555202276, 34.34407628842917),
Offset(40.549700843563855, 34.842850270502765),
Offset(40.32251090061059, 35.18193354923236),
Offset(40.17806375954897, 35.38991891946419),
Offset(40.10887998927547, 35.48755785583344),
],
<Offset>[
Offset(3.3000000000000016, 12.5),
Offset(3.4147766280098404, 12.295787992125664),
Offset(3.8383337983247614, 11.580369732869412),
Offset(4.802941492912208, 10.135911689712586),
Offset(6.904395525334929, 7.614631293565236),
Offset(12.005069007229174, 3.5828104167428108),
Offset(26.075723800682262, 0.4112024320169896),
Offset(41.1117922138676, 7.631537420105092),
Offset(46.11610001573439, 15.537251032079869),
Offset(47.512302184552304, 21.18723517117103),
Offset(47.64869493506418, 25.216235120472277),
Offset(47.31360608049677, 28.14918926097903),
Offset(46.8216717321285, 30.317539026469625),
Offset(46.31154498753962, 31.933155757263034),
Offset(45.84659399308845, 33.13599096437555),
Offset(45.45464707759584, 34.021881997699246),
Offset(45.14597536403577, 34.6577542617379),
Offset(44.92162560467643, 35.0916897746803),
Offset(44.77795675722907, 35.358543612396744),
Offset(44.70887861641319, 35.48400393811605),
],
<Offset>[
Offset(3.3000000000000016, 12.5),
Offset(3.4147766280098404, 12.295787992125664),
Offset(3.8383337983247614, 11.580369732869412),
Offset(4.802941492912208, 10.135911689712586),
Offset(6.904395525334929, 7.614631293565236),
Offset(12.005069007229174, 3.5828104167428108),
Offset(26.075723800682262, 0.4112024320169896),
Offset(41.1117922138676, 7.631537420105092),
Offset(46.11610001573439, 15.537251032079869),
Offset(47.512302184552304, 21.18723517117103),
Offset(47.64869493506418, 25.216235120472277),
Offset(47.31360608049677, 28.14918926097903),
Offset(46.8216717321285, 30.317539026469625),
Offset(46.31154498753962, 31.933155757263034),
Offset(45.84659399308845, 33.13599096437555),
Offset(45.45464707759584, 34.021881997699246),
Offset(45.14597536403577, 34.6577542617379),
Offset(44.92162560467643, 35.0916897746803),
Offset(44.77795675722907, 35.358543612396744),
Offset(44.70887861641319, 35.48400393811605),
],
),
_PathCubicTo(
<Offset>[
Offset(3.3000000000000016, 12.5),
Offset(3.4147766280098404, 12.295787992125664),
Offset(3.8383337983247614, 11.580369732869412),
Offset(4.802941492912208, 10.135911689712586),
Offset(6.904395525334929, 7.614631293565236),
Offset(12.005069007229174, 3.5828104167428108),
Offset(26.075723800682262, 0.4112024320169896),
Offset(41.1117922138676, 7.631537420105092),
Offset(46.11610001573439, 15.537251032079869),
Offset(47.512302184552304, 21.18723517117103),
Offset(47.64869493506418, 25.216235120472277),
Offset(47.31360608049677, 28.14918926097903),
Offset(46.8216717321285, 30.317539026469625),
Offset(46.31154498753962, 31.933155757263034),
Offset(45.84659399308845, 33.13599096437555),
Offset(45.45464707759584, 34.021881997699246),
Offset(45.14597536403577, 34.6577542617379),
Offset(44.92162560467643, 35.0916897746803),
Offset(44.77795675722907, 35.358543612396744),
Offset(44.70887861641319, 35.48400393811605),
],
<Offset>[
Offset(3.3000000000000016, 17.1),
Offset(3.3692711334642134, 16.89556290509327),
Offset(3.631383960668174, 16.17571213193979),
Offset(4.25970560126791, 14.703722408867815),
Offset(5.734767299210637, 12.063447969115414),
Offset(9.669596341465768, 7.545835451671554),
Offset(21.874255930583047, 2.2840792930316054),
Offset(36.7179219442753, 6.269955966796905),
Offset(42.592604906489996, 12.580059422608004),
Offset(44.81652115847264, 17.459935255759223),
Offset(45.624216471081716, 21.085679837114938),
Offset(45.81878858891804, 23.798842071745703),
Offset(45.74147347887537, 25.84616656002614),
Offset(45.55382190975979, 27.395991914354134),
Offset(45.33698925184199, 28.564306044381702),
Offset(45.13245278686591, 29.433179475305685),
Offset(44.960879355270905, 30.061479741265988),
Offset(44.831381830124364, 30.492575070614457),
Offset(44.74658145016162, 30.758650614716647),
Offset(44.7053246986958, 30.884005310978335),
],
<Offset>[
Offset(3.3000000000000016, 17.1),
Offset(3.3692711334642134, 16.89556290509327),
Offset(3.631383960668174, 16.17571213193979),
Offset(4.25970560126791, 14.703722408867815),
Offset(5.734767299210637, 12.063447969115414),
Offset(9.669596341465768, 7.545835451671554),
Offset(21.874255930583047, 2.2840792930316054),
Offset(36.7179219442753, 6.269955966796905),
Offset(42.592604906489996, 12.580059422608004),
Offset(44.81652115847264, 17.459935255759223),
Offset(45.624216471081716, 21.085679837114938),
Offset(45.81878858891804, 23.798842071745703),
Offset(45.74147347887537, 25.84616656002614),
Offset(45.55382190975979, 27.395991914354134),
Offset(45.33698925184199, 28.564306044381702),
Offset(45.13245278686591, 29.433179475305685),
Offset(44.960879355270905, 30.061479741265988),
Offset(44.831381830124364, 30.492575070614457),
Offset(44.74658145016162, 30.758650614716647),
Offset(44.7053246986958, 30.884005310978335),
],
),
_PathClose(
),
],
),
_PathFrames(
opacities: <double>[
1.0,
1.0,
1.0,
1.0,
1.0,
0.878048780488,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
],
commands: <_PathCommand>[
_PathMoveTo(
<Offset>[
Offset(3.3000000000000016, 26.3),
Offset(3.2782601443729593, 26.095112731028483),
Offset(3.217484285354999, 25.366396930080548),
Offset(3.1732338179793156, 23.839343847178277),
Offset(3.3955108469620523, 20.961081320215772),
Offset(4.998651009938952, 15.471885521529039),
Offset(13.471320190384617, 6.029833015060841),
Offset(27.930181405090686, 3.5467930601805335),
Offset(35.545614688001194, 6.665676203664274),
Offset(39.42495910631331, 10.005335424935609),
Offset(41.57525954311679, 12.824569270400263),
Offset(42.82915360576058, 15.098147693279058),
Offset(43.58107697236911, 16.903421627139174),
Offset(44.03837575420013, 18.32166422853633),
Offset(44.31777976934908, 19.420936204394014),
Offset(44.48806420540607, 20.25577443051856),
Offset(44.59068733774117, 20.86893070032216),
Offset(44.650894281020236, 21.294345662482787),
Offset(44.68383083602673, 21.558864619356445),
Offset(44.698216863261024, 21.684008056702904),
],
),
_PathCubicTo(
<Offset>[
Offset(3.3000000000000016, 26.3),
Offset(3.2782601443729593, 26.095112731028483),
Offset(3.217484285354999, 25.366396930080548),
Offset(3.1732338179793156, 23.839343847178277),
Offset(3.3955108469620523, 20.961081320215772),
Offset(4.998651009938952, 15.471885521529039),
Offset(13.471320190384617, 6.029833015060841),
Offset(27.930181405090686, 3.5467930601805335),
Offset(35.545614688001194, 6.665676203664274),
Offset(39.42495910631331, 10.005335424935609),
Offset(41.57525954311679, 12.824569270400263),
Offset(42.82915360576058, 15.098147693279058),
Offset(43.58107697236911, 16.903421627139174),
Offset(44.03837575420013, 18.32166422853633),
Offset(44.31777976934908, 19.420936204394014),
Offset(44.48806420540607, 20.25577443051856),
Offset(44.59068733774117, 20.86893070032216),
Offset(44.650894281020236, 21.294345662482787),
Offset(44.68383083602673, 21.558864619356445),
Offset(44.698216863261024, 21.684008056702904),
],
<Offset>[
Offset(7.900000000000001, 26.3),
Offset(7.878035057340566, 26.14061822557411),
Offset(7.812826684425378, 25.573346767737135),
Offset(7.741044537134545, 24.382579738822574),
Offset(7.844327522512231, 22.130709546340064),
Offset(8.961676044867694, 17.807358187292447),
Offset(15.344197051399235, 10.231300885160056),
Offset(26.568599951782502, 7.940663329772839),
Offset(32.58842307852933, 10.189171312908673),
Offset(35.6976591909015, 12.701116451015272),
Offset(37.444704259759455, 14.84904773438272),
Offset(38.47880641652726, 16.592965184857785),
Offset(39.10970450592563, 17.983619880392304),
Offset(39.501211911291236, 19.079387306316157),
Offset(39.74609484935523, 19.930540945640473),
Offset(39.89936168301251, 20.577968721248485),
Offset(39.99441281726926, 21.054026709087022),
Offset(40.051779576954395, 21.384589437034855),
Offset(40.08393783834663, 21.59023992642389),
Offset(40.09821823612331, 21.68756197442029),
],
<Offset>[
Offset(7.900000000000001, 26.3),
Offset(7.878035057340566, 26.14061822557411),
Offset(7.812826684425378, 25.573346767737135),
Offset(7.741044537134545, 24.382579738822574),
Offset(7.844327522512231, 22.130709546340064),
Offset(8.961676044867694, 17.807358187292447),
Offset(15.344197051399235, 10.231300885160056),
Offset(26.568599951782502, 7.940663329772839),
Offset(32.58842307852933, 10.189171312908673),
Offset(35.6976591909015, 12.701116451015272),
Offset(37.444704259759455, 14.84904773438272),
Offset(38.47880641652726, 16.592965184857785),
Offset(39.10970450592563, 17.983619880392304),
Offset(39.501211911291236, 19.079387306316157),
Offset(39.74609484935523, 19.930540945640473),
Offset(39.89936168301251, 20.577968721248485),
Offset(39.99441281726926, 21.054026709087022),
Offset(40.051779576954395, 21.384589437034855),
Offset(40.08393783834663, 21.59023992642389),
Offset(40.09821823612331, 21.68756197442029),
],
),
_PathCubicTo(
<Offset>[
Offset(7.900000000000001, 26.3),
Offset(7.878035057340566, 26.14061822557411),
Offset(7.812826684425378, 25.573346767737135),
Offset(7.741044537134545, 24.382579738822574),
Offset(7.844327522512231, 22.130709546340064),
Offset(8.961676044867694, 17.807358187292447),
Offset(15.344197051399235, 10.231300885160056),
Offset(26.568599951782502, 7.940663329772839),
Offset(32.58842307852933, 10.189171312908673),
Offset(35.6976591909015, 12.701116451015272),
Offset(37.444704259759455, 14.84904773438272),
Offset(38.47880641652726, 16.592965184857785),
Offset(39.10970450592563, 17.983619880392304),
Offset(39.501211911291236, 19.079387306316157),
Offset(39.74609484935523, 19.930540945640473),
Offset(39.89936168301251, 20.577968721248485),
Offset(39.99441281726926, 21.054026709087022),
Offset(40.051779576954395, 21.384589437034855),
Offset(40.08393783834663, 21.59023992642389),
Offset(40.09821823612331, 21.68756197442029),
],
<Offset>[
Offset(7.900000000000001, 21.7),
Offset(7.923540551886193, 21.5408433126065),
Offset(8.019776522081965, 20.97800436866676),
Offset(8.284280428778843, 19.814769019667345),
Offset(9.013955748636523, 17.681892870789884),
Offset(11.2971487106311, 13.844333152363703),
Offset(19.54566492149845, 8.358424024145439),
Offset(30.962470221374808, 9.302244783081026),
Offset(36.111918187773725, 13.146362922380538),
Offset(38.39344021698116, 16.42841636642708),
Offset(39.469182723741916, 18.97960301774006),
Offset(39.97362390810599, 20.94331237409111),
Offset(40.18990275917876, 22.454992346835787),
Offset(40.258934989071065, 23.616551149225057),
Offset(40.25569959060169, 24.50222586563432),
Offset(40.22155597374243, 25.166671243642046),
Offset(40.17950882603412, 25.650301229558934),
Offset(40.14202335150646, 25.98370414110069),
Offset(40.11531314541408, 26.190132924103988),
Offset(40.1017721538407, 26.287560601558003),
],
<Offset>[
Offset(7.900000000000001, 21.7),
Offset(7.923540551886193, 21.5408433126065),
Offset(8.019776522081965, 20.97800436866676),
Offset(8.284280428778843, 19.814769019667345),
Offset(9.013955748636523, 17.681892870789884),
Offset(11.2971487106311, 13.844333152363703),
Offset(19.54566492149845, 8.358424024145439),
Offset(30.962470221374808, 9.302244783081026),
Offset(36.111918187773725, 13.146362922380538),
Offset(38.39344021698116, 16.42841636642708),
Offset(39.469182723741916, 18.97960301774006),
Offset(39.97362390810599, 20.94331237409111),
Offset(40.18990275917876, 22.454992346835787),
Offset(40.258934989071065, 23.616551149225057),
Offset(40.25569959060169, 24.50222586563432),
Offset(40.22155597374243, 25.166671243642046),
Offset(40.17950882603412, 25.650301229558934),
Offset(40.14202335150646, 25.98370414110069),
Offset(40.11531314541408, 26.190132924103988),
Offset(40.1017721538407, 26.287560601558003),
],
),
_PathCubicTo(
<Offset>[
Offset(7.900000000000001, 21.7),
Offset(7.923540551886193, 21.5408433126065),
Offset(8.019776522081965, 20.97800436866676),
Offset(8.284280428778843, 19.814769019667345),
Offset(9.013955748636523, 17.681892870789884),
Offset(11.2971487106311, 13.844333152363703),
Offset(19.54566492149845, 8.358424024145439),
Offset(30.962470221374808, 9.302244783081026),
Offset(36.111918187773725, 13.146362922380538),
Offset(38.39344021698116, 16.42841636642708),
Offset(39.469182723741916, 18.97960301774006),
Offset(39.97362390810599, 20.94331237409111),
Offset(40.18990275917876, 22.454992346835787),
Offset(40.258934989071065, 23.616551149225057),
Offset(40.25569959060169, 24.50222586563432),
Offset(40.22155597374243, 25.166671243642046),
Offset(40.17950882603412, 25.650301229558934),
Offset(40.14202335150646, 25.98370414110069),
Offset(40.11531314541408, 26.190132924103988),
Offset(40.1017721538407, 26.287560601558003),
],
<Offset>[
Offset(3.3000000000000016, 21.7),
Offset(3.3237656389185863, 21.495337818060875),
Offset(3.4244341230115865, 20.771054531010172),
Offset(3.716469709623613, 19.271533128023048),
Offset(4.565139073086344, 16.512264644665592),
Offset(7.334123675702358, 11.508860486600296),
Offset(17.672788060483832, 4.156956154046225),
Offset(32.32405167468299, 4.90837451348872),
Offset(39.06910979724559, 9.62286781313614),
Offset(42.120740132392974, 13.732635340347416),
Offset(43.599738007099255, 16.9551245537576),
Offset(44.32397109733931, 19.44849488251238),
Offset(44.66127522562224, 21.374794093582658),
Offset(44.79609883197996, 22.85882807144523),
Offset(44.827384510595536, 23.99262112438786),
Offset(44.810258496135994, 24.84447695291212),
Offset(44.77578334650604, 25.465205220794072),
Offset(44.7411380555723, 25.893460366548624),
Offset(44.71520614309418, 26.158757617036542),
Offset(44.701770780978414, 26.284006683840616),
],
<Offset>[
Offset(3.3000000000000016, 21.7),
Offset(3.3237656389185863, 21.495337818060875),
Offset(3.4244341230115865, 20.771054531010172),
Offset(3.716469709623613, 19.271533128023048),
Offset(4.565139073086344, 16.512264644665592),
Offset(7.334123675702358, 11.508860486600296),
Offset(17.672788060483832, 4.156956154046225),
Offset(32.32405167468299, 4.90837451348872),
Offset(39.06910979724559, 9.62286781313614),
Offset(42.120740132392974, 13.732635340347416),
Offset(43.599738007099255, 16.9551245537576),
Offset(44.32397109733931, 19.44849488251238),
Offset(44.66127522562224, 21.374794093582658),
Offset(44.79609883197996, 22.85882807144523),
Offset(44.827384510595536, 23.99262112438786),
Offset(44.810258496135994, 24.84447695291212),
Offset(44.77578334650604, 25.465205220794072),
Offset(44.7411380555723, 25.893460366548624),
Offset(44.71520614309418, 26.158757617036542),
Offset(44.701770780978414, 26.284006683840616),
],
),
_PathCubicTo(
<Offset>[
Offset(3.3000000000000016, 21.7),
Offset(3.3237656389185863, 21.495337818060875),
Offset(3.4244341230115865, 20.771054531010172),
Offset(3.716469709623613, 19.271533128023048),
Offset(4.565139073086344, 16.512264644665592),
Offset(7.334123675702358, 11.508860486600296),
Offset(17.672788060483832, 4.156956154046225),
Offset(32.32405167468299, 4.90837451348872),
Offset(39.06910979724559, 9.62286781313614),
Offset(42.120740132392974, 13.732635340347416),
Offset(43.599738007099255, 16.9551245537576),
Offset(44.32397109733931, 19.44849488251238),
Offset(44.66127522562224, 21.374794093582658),
Offset(44.79609883197996, 22.85882807144523),
Offset(44.827384510595536, 23.99262112438786),
Offset(44.810258496135994, 24.84447695291212),
Offset(44.77578334650604, 25.465205220794072),
Offset(44.7411380555723, 25.893460366548624),
Offset(44.71520614309418, 26.158757617036542),
Offset(44.701770780978414, 26.284006683840616),
],
<Offset>[
Offset(3.3000000000000016, 26.3),
Offset(3.2782601443729593, 26.095112731028483),
Offset(3.217484285354999, 25.366396930080548),
Offset(3.1732338179793156, 23.839343847178277),
Offset(3.3955108469620523, 20.961081320215772),
Offset(4.998651009938952, 15.471885521529039),
Offset(13.471320190384617, 6.029833015060841),
Offset(27.930181405090686, 3.5467930601805335),
Offset(35.545614688001194, 6.665676203664274),
Offset(39.42495910631331, 10.005335424935609),
Offset(41.57525954311679, 12.824569270400263),
Offset(42.82915360576058, 15.098147693279058),
Offset(43.58107697236911, 16.903421627139174),
Offset(44.03837575420013, 18.32166422853633),
Offset(44.31777976934908, 19.420936204394014),
Offset(44.48806420540607, 20.25577443051856),
Offset(44.59068733774117, 20.86893070032216),
Offset(44.650894281020236, 21.294345662482787),
Offset(44.68383083602673, 21.558864619356445),
Offset(44.698216863261024, 21.684008056702904),
],
<Offset>[
Offset(3.3000000000000016, 26.3),
Offset(3.2782601443729593, 26.095112731028483),
Offset(3.217484285354999, 25.366396930080548),
Offset(3.1732338179793156, 23.839343847178277),
Offset(3.3955108469620523, 20.961081320215772),
Offset(4.998651009938952, 15.471885521529039),
Offset(13.471320190384617, 6.029833015060841),
Offset(27.930181405090686, 3.5467930601805335),
Offset(35.545614688001194, 6.665676203664274),
Offset(39.42495910631331, 10.005335424935609),
Offset(41.57525954311679, 12.824569270400263),
Offset(42.82915360576058, 15.098147693279058),
Offset(43.58107697236911, 16.903421627139174),
Offset(44.03837575420013, 18.32166422853633),
Offset(44.31777976934908, 19.420936204394014),
Offset(44.48806420540607, 20.25577443051856),
Offset(44.59068733774117, 20.86893070032216),
Offset(44.650894281020236, 21.294345662482787),
Offset(44.68383083602673, 21.558864619356445),
Offset(44.698216863261024, 21.684008056702904),
],
),
_PathClose(
),
],
),
_PathFrames(
opacities: <double>[
1.0,
1.0,
1.0,
1.0,
1.0,
0.878048780488,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
],
commands: <_PathCommand>[
_PathMoveTo(
<Offset>[
Offset(12.5, 35.5),
Offset(12.386798981216916, 35.38567354605495),
Offset(11.994269408182586, 34.97098140353448),
Offset(11.222383473001184, 34.06143706877733),
Offset(9.953887745813823, 32.19797112356471),
Offset(8.253755748269624, 28.068880922913333),
Offset(8.81413817221542, 18.1785224772885),
Offset(16.419277959289705, 9.611370692748771),
Offset(22.584241250568667, 7.798283203209337),
Offset(26.57879722333036, 7.942297646271321),
Offset(29.2651920484372, 8.612415631650505),
Offset(31.13882424413648, 9.387088297969871),
Offset(32.47793553297588, 10.121073200758469),
Offset(33.44860191282268, 10.762782698278183),
Offset(34.15520044686847, 11.296775846899239),
Offset(34.666270579159104, 11.72275796719129),
Offset(35.027946279267624, 12.046573676908062),
Offset(35.27217732378443, 12.276603803455243),
Offset(35.42129422653164, 12.421829238131133),
Offset(35.49111177355083, 12.491118637862245),
],
),
_PathCubicTo(
<Offset>[
Offset(12.5, 35.5),
Offset(12.386798981216916, 35.38567354605495),
Offset(11.994269408182586, 34.97098140353448),
Offset(11.222383473001184, 34.06143706877733),
Offset(9.953887745813823, 32.19797112356471),
Offset(8.253755748269624, 28.068880922913333),
Offset(8.81413817221542, 18.1785224772885),
Offset(16.419277959289705, 9.611370692748771),
Offset(22.584241250568667, 7.798283203209337),
Offset(26.57879722333036, 7.942297646271321),
Offset(29.2651920484372, 8.612415631650505),
Offset(31.13882424413648, 9.387088297969871),
Offset(32.47793553297588, 10.121073200758469),
Offset(33.44860191282268, 10.762782698278183),
Offset(34.15520044686847, 11.296775846899239),
Offset(34.666270579159104, 11.72275796719129),
Offset(35.027946279267624, 12.046573676908062),
Offset(35.27217732378443, 12.276603803455243),
Offset(35.42129422653164, 12.421829238131133),
Offset(35.49111177355083, 12.491118637862245),
],
<Offset>[
Offset(44.699999999999996, 35.5),
Offset(44.58522337199017, 35.70421200787435),
Offset(44.161666201675246, 36.41963026713059),
Offset(43.197058507087796, 37.86408831028741),
Offset(41.09560447466507, 40.38536870643476),
Offset(35.994930992770826, 44.41718958325718),
Offset(21.92427619931773, 47.58879756798301),
Offset(6.8882077861324005, 40.36846257989491),
Offset(1.8838999842656072, 32.46274896792012),
Offset(0.4876978154477065, 26.81276482882897),
Offset(0.3513050649358309, 22.783764879527716),
Offset(0.6863939195032227, 19.85081073902098),
Offset(1.1783282678714926, 17.682460973530382),
Offset(1.6884550124603805, 16.066844242736977),
Offset(2.1534060069115526, 14.864009035624443),
Offset(2.5453529224041667, 13.978118002300755),
Offset(2.854024635964233, 13.34224573826211),
Offset(3.0783743953235785, 12.9083102253197),
Offset(3.222043242770944, 12.641456387603249),
Offset(3.2911213835868267, 12.515996061883946),
],
<Offset>[
Offset(44.699999999999996, 35.5),
Offset(44.58522337199017, 35.70421200787435),
Offset(44.161666201675246, 36.41963026713059),
Offset(43.197058507087796, 37.86408831028741),
Offset(41.09560447466507, 40.38536870643476),
Offset(35.994930992770826, 44.41718958325718),
Offset(21.92427619931773, 47.58879756798301),
Offset(6.8882077861324005, 40.36846257989491),
Offset(1.8838999842656072, 32.46274896792012),
Offset(0.4876978154477065, 26.81276482882897),
Offset(0.3513050649358309, 22.783764879527716),
Offset(0.6863939195032227, 19.85081073902098),
Offset(1.1783282678714926, 17.682460973530382),
Offset(1.6884550124603805, 16.066844242736977),
Offset(2.1534060069115526, 14.864009035624443),
Offset(2.5453529224041667, 13.978118002300755),
Offset(2.854024635964233, 13.34224573826211),
Offset(3.0783743953235785, 12.9083102253197),
Offset(3.222043242770944, 12.641456387603249),
Offset(3.2911213835868267, 12.515996061883946),
],
),
_PathCubicTo(
<Offset>[
Offset(44.699999999999996, 35.5),
Offset(44.58522337199017, 35.70421200787435),
Offset(44.161666201675246, 36.41963026713059),
Offset(43.197058507087796, 37.86408831028741),
Offset(41.09560447466507, 40.38536870643476),
Offset(35.994930992770826, 44.41718958325718),
Offset(21.92427619931773, 47.58879756798301),
Offset(6.8882077861324005, 40.36846257989491),
Offset(1.8838999842656072, 32.46274896792012),
Offset(0.4876978154477065, 26.81276482882897),
Offset(0.3513050649358309, 22.783764879527716),
Offset(0.6863939195032227, 19.85081073902098),
Offset(1.1783282678714926, 17.682460973530382),
Offset(1.6884550124603805, 16.066844242736977),
Offset(2.1534060069115526, 14.864009035624443),
Offset(2.5453529224041667, 13.978118002300755),
Offset(2.854024635964233, 13.34224573826211),
Offset(3.0783743953235785, 12.9083102253197),
Offset(3.222043242770944, 12.641456387603249),
Offset(3.2911213835868267, 12.515996061883946),
],
<Offset>[
Offset(44.699999999999996, 30.900000000000002),
Offset(44.63072886653579, 31.104437094906736),
Offset(44.368616039331826, 31.82428786806021),
Offset(43.74029439873209, 33.296277591132174),
Offset(42.26523270078937, 35.936552030884584),
Offset(38.33040365853423, 40.454164548328436),
Offset(26.125744069416946, 45.71592070696839),
Offset(11.282078055724707, 41.73004403320309),
Offset(5.407395093510004, 35.41994057739199),
Offset(3.1834788415273714, 30.54006474424078),
Offset(2.375783528918289, 26.914320162885055),
Offset(2.181211411081952, 24.2011579282543),
Offset(2.2585265211246224, 22.153833439973866),
Offset(2.446178090240206, 20.604008085645876),
Offset(2.66301074815801, 19.43569395561829),
Offset(2.8675472131340918, 18.566820524694318),
Offset(3.0391206447290973, 17.938520258734023),
Offset(3.168618169875643, 17.507424929385536),
Offset(3.2534185498383863, 17.24134938528335),
Offset(3.29467530130421, 17.11599468902166),
],
<Offset>[
Offset(44.699999999999996, 30.900000000000002),
Offset(44.63072886653579, 31.104437094906736),
Offset(44.368616039331826, 31.82428786806021),
Offset(43.74029439873209, 33.296277591132174),
Offset(42.26523270078937, 35.936552030884584),
Offset(38.33040365853423, 40.454164548328436),
Offset(26.125744069416946, 45.71592070696839),
Offset(11.282078055724707, 41.73004403320309),
Offset(5.407395093510004, 35.41994057739199),
Offset(3.1834788415273714, 30.54006474424078),
Offset(2.375783528918289, 26.914320162885055),
Offset(2.181211411081952, 24.2011579282543),
Offset(2.2585265211246224, 22.153833439973866),
Offset(2.446178090240206, 20.604008085645876),
Offset(2.66301074815801, 19.43569395561829),
Offset(2.8675472131340918, 18.566820524694318),
Offset(3.0391206447290973, 17.938520258734023),
Offset(3.168618169875643, 17.507424929385536),
Offset(3.2534185498383863, 17.24134938528335),
Offset(3.29467530130421, 17.11599468902166),
],
),
_PathCubicTo(
<Offset>[
Offset(44.699999999999996, 30.900000000000002),
Offset(44.63072886653579, 31.104437094906736),
Offset(44.368616039331826, 31.82428786806021),
Offset(43.74029439873209, 33.296277591132174),
Offset(42.26523270078937, 35.936552030884584),
Offset(38.33040365853423, 40.454164548328436),
Offset(26.125744069416946, 45.71592070696839),
Offset(11.282078055724707, 41.73004403320309),
Offset(5.407395093510004, 35.41994057739199),
Offset(3.1834788415273714, 30.54006474424078),
Offset(2.375783528918289, 26.914320162885055),
Offset(2.181211411081952, 24.2011579282543),
Offset(2.2585265211246224, 22.153833439973866),
Offset(2.446178090240206, 20.604008085645876),
Offset(2.66301074815801, 19.43569395561829),
Offset(2.8675472131340918, 18.566820524694318),
Offset(3.0391206447290973, 17.938520258734023),
Offset(3.168618169875643, 17.507424929385536),
Offset(3.2534185498383863, 17.24134938528335),
Offset(3.29467530130421, 17.11599468902166),
],
<Offset>[
Offset(12.5, 30.900000000000002),
Offset(12.432304475762546, 30.785898633087346),
Offset(12.201219245839173, 30.3756390044641),
Offset(11.765619364645481, 29.493626349622097),
Offset(11.123515971938117, 27.749154448014536),
Offset(10.589228414033032, 24.10585588798459),
Offset(13.015606042314635, 16.305645616273882),
Offset(20.81314822888201, 10.972952146056956),
Offset(26.107736359813064, 10.755474812681204),
Offset(29.274578249410023, 11.66959756168313),
Offset(31.28967051241966, 12.742970915007843),
Offset(32.63364173571521, 13.737435487203195),
Offset(33.55813378622901, 14.592445667201952),
Offset(34.20632499060251, 15.299946541187085),
Offset(34.664805188114926, 15.868460766893085),
Offset(34.98846486988903, 16.311460489584853),
Offset(35.21304228803248, 16.642848197379976),
Offset(35.3624210983365, 16.87571850752108),
Offset(35.452669533599085, 17.021722235811232),
Offset(35.49466569126821, 17.09111726499996),
],
<Offset>[
Offset(12.5, 30.900000000000002),
Offset(12.432304475762546, 30.785898633087346),
Offset(12.201219245839173, 30.3756390044641),
Offset(11.765619364645481, 29.493626349622097),
Offset(11.123515971938117, 27.749154448014536),
Offset(10.589228414033032, 24.10585588798459),
Offset(13.015606042314635, 16.305645616273882),
Offset(20.81314822888201, 10.972952146056956),
Offset(26.107736359813064, 10.755474812681204),
Offset(29.274578249410023, 11.66959756168313),
Offset(31.28967051241966, 12.742970915007843),
Offset(32.63364173571521, 13.737435487203195),
Offset(33.55813378622901, 14.592445667201952),
Offset(34.20632499060251, 15.299946541187085),
Offset(34.664805188114926, 15.868460766893085),
Offset(34.98846486988903, 16.311460489584853),
Offset(35.21304228803248, 16.642848197379976),
Offset(35.3624210983365, 16.87571850752108),
Offset(35.452669533599085, 17.021722235811232),
Offset(35.49466569126821, 17.09111726499996),
],
),
_PathCubicTo(
<Offset>[
Offset(12.5, 30.900000000000002),
Offset(12.432304475762546, 30.785898633087346),
Offset(12.201219245839173, 30.3756390044641),
Offset(11.765619364645481, 29.493626349622097),
Offset(11.123515971938117, 27.749154448014536),
Offset(10.589228414033032, 24.10585588798459),
Offset(13.015606042314635, 16.305645616273882),
Offset(20.81314822888201, 10.972952146056956),
Offset(26.107736359813064, 10.755474812681204),
Offset(29.274578249410023, 11.66959756168313),
Offset(31.28967051241966, 12.742970915007843),
Offset(32.63364173571521, 13.737435487203195),
Offset(33.55813378622901, 14.592445667201952),
Offset(34.20632499060251, 15.299946541187085),
Offset(34.664805188114926, 15.868460766893085),
Offset(34.98846486988903, 16.311460489584853),
Offset(35.21304228803248, 16.642848197379976),
Offset(35.3624210983365, 16.87571850752108),
Offset(35.452669533599085, 17.021722235811232),
Offset(35.49466569126821, 17.09111726499996),
],
<Offset>[
Offset(12.5, 35.5),
Offset(12.386798981216916, 35.38567354605495),
Offset(11.994269408182586, 34.97098140353448),
Offset(11.222383473001184, 34.06143706877733),
Offset(9.953887745813823, 32.19797112356471),
Offset(8.253755748269624, 28.068880922913333),
Offset(8.81413817221542, 18.1785224772885),
Offset(16.419277959289705, 9.611370692748771),
Offset(22.584241250568667, 7.798283203209337),
Offset(26.57879722333036, 7.942297646271321),
Offset(29.2651920484372, 8.612415631650505),
Offset(31.13882424413648, 9.387088297969871),
Offset(32.47793553297588, 10.121073200758469),
Offset(33.44860191282268, 10.762782698278183),
Offset(34.15520044686847, 11.296775846899239),
Offset(34.666270579159104, 11.72275796719129),
Offset(35.027946279267624, 12.046573676908062),
Offset(35.27217732378443, 12.276603803455243),
Offset(35.42129422653164, 12.421829238131133),
Offset(35.49111177355083, 12.491118637862245),
],
<Offset>[
Offset(12.5, 35.5),
Offset(12.386798981216916, 35.38567354605495),
Offset(11.994269408182586, 34.97098140353448),
Offset(11.222383473001184, 34.06143706877733),
Offset(9.953887745813823, 32.19797112356471),
Offset(8.253755748269624, 28.068880922913333),
Offset(8.81413817221542, 18.1785224772885),
Offset(16.419277959289705, 9.611370692748771),
Offset(22.584241250568667, 7.798283203209337),
Offset(26.57879722333036, 7.942297646271321),
Offset(29.2651920484372, 8.612415631650505),
Offset(31.13882424413648, 9.387088297969871),
Offset(32.47793553297588, 10.121073200758469),
Offset(33.44860191282268, 10.762782698278183),
Offset(34.15520044686847, 11.296775846899239),
Offset(34.666270579159104, 11.72275796719129),
Offset(35.027946279267624, 12.046573676908062),
Offset(35.27217732378443, 12.276603803455243),
Offset(35.42129422653164, 12.421829238131133),
Offset(35.49111177355083, 12.491118637862245),
],
),
_PathClose(
),
],
),
_PathFrames(
opacities: <double>[
1.0,
1.0,
1.0,
1.0,
1.0,
0.878048780488,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
],
commands: <_PathCommand>[
_PathMoveTo(
<Offset>[
Offset(12.5, 17.1),
Offset(12.568820959399424, 16.986573894184524),
Offset(12.822068758808932, 16.589611807252965),
Offset(13.395327039578369, 15.790194192156408),
Offset(14.632400650310995, 14.402704421364),
Offset(17.59564641132325, 12.216780783198363),
Offset(25.620009652612282, 10.687015033230036),
Offset(33.99475903765893, 15.057696505981518),
Offset(36.67822168754626, 19.6270496410968),
Offset(37.361921327649014, 22.851497307918553),
Offset(37.36310590436704, 25.13463676507986),
Offset(37.118094210451396, 26.788477054903165),
Offset(36.7987285459884, 28.0065630665324),
Offset(36.479494223942, 28.91143806991379),
Offset(36.1936194118543, 29.58351552687462),
Offset(35.95504774207879, 30.077568056765532),
Offset(35.76833031432708, 30.43167175879571),
Offset(35.63315242199269, 30.673062619718593),
Offset(35.54679545480142, 30.821401228851528),
Offset(35.50532744442037, 30.891113146413097),
],
),
_PathCubicTo(
<Offset>[
Offset(12.5, 17.1),
Offset(12.568820959399424, 16.986573894184524),
Offset(12.822068758808932, 16.589611807252965),
Offset(13.395327039578369, 15.790194192156408),
Offset(14.632400650310995, 14.402704421364),
Offset(17.59564641132325, 12.216780783198363),
Offset(25.620009652612282, 10.687015033230036),
Offset(33.99475903765893, 15.057696505981518),
Offset(36.67822168754626, 19.6270496410968),
Offset(37.361921327649014, 22.851497307918553),
Offset(37.36310590436704, 25.13463676507986),
Offset(37.118094210451396, 26.788477054903165),
Offset(36.7987285459884, 28.0065630665324),
Offset(36.479494223942, 28.91143806991379),
Offset(36.1936194118543, 29.58351552687462),
Offset(35.95504774207879, 30.077568056765532),
Offset(35.76833031432708, 30.43167175879571),
Offset(35.63315242199269, 30.673062619718593),
Offset(35.54679545480142, 30.821401228851528),
Offset(35.50532744442037, 30.891113146413097),
],
<Offset>[
Offset(44.699999999999996, 17.1),
Offset(44.76724535017267, 17.305112356003914),
Offset(44.98946555230159, 18.038260670849073),
Offset(45.37000207366498, 19.592845433666486),
Offset(45.77411737916225, 22.590102004234048),
Offset(45.33682165582445, 28.565089443542213),
Offset(38.7301476797146, 40.09729012392454),
Offset(24.463688864501623, 45.81478839312766),
Offset(15.977880421243203, 44.29151540580759),
Offset(11.270821919766366, 41.7219644904762),
Offset(8.44921892086567, 39.30598601295708),
Offset(6.665663885818139, 37.25219949595427),
Offset(5.499121280884019, 35.56795083930431),
Offset(4.71934732357969, 34.21549961437258),
Offset(4.191824971897383, 33.150748715599825),
Offset(3.83413008532386, 32.332928091875),
Offset(3.5944086710236895, 31.727343820149756),
Offset(3.439349493531836, 31.30476904158305),
Offset(3.3475444710407203, 31.041028378323645),
Offset(3.3053370544563663, 30.9159905704348),
],
<Offset>[
Offset(44.699999999999996, 17.1),
Offset(44.76724535017267, 17.305112356003914),
Offset(44.98946555230159, 18.038260670849073),
Offset(45.37000207366498, 19.592845433666486),
Offset(45.77411737916225, 22.590102004234048),
Offset(45.33682165582445, 28.565089443542213),
Offset(38.7301476797146, 40.09729012392454),
Offset(24.463688864501623, 45.81478839312766),
Offset(15.977880421243203, 44.29151540580759),
Offset(11.270821919766366, 41.7219644904762),
Offset(8.44921892086567, 39.30598601295708),
Offset(6.665663885818139, 37.25219949595427),
Offset(5.499121280884019, 35.56795083930431),
Offset(4.71934732357969, 34.21549961437258),
Offset(4.191824971897383, 33.150748715599825),
Offset(3.83413008532386, 32.332928091875),
Offset(3.5944086710236895, 31.727343820149756),
Offset(3.439349493531836, 31.30476904158305),
Offset(3.3475444710407203, 31.041028378323645),
Offset(3.3053370544563663, 30.9159905704348),
],
),
_PathCubicTo(
<Offset>[
Offset(44.699999999999996, 17.1),
Offset(44.76724535017267, 17.305112356003914),
Offset(44.98946555230159, 18.038260670849073),
Offset(45.37000207366498, 19.592845433666486),
Offset(45.77411737916225, 22.590102004234048),
Offset(45.33682165582445, 28.565089443542213),
Offset(38.7301476797146, 40.09729012392454),
Offset(24.463688864501623, 45.81478839312766),
Offset(15.977880421243203, 44.29151540580759),
Offset(11.270821919766366, 41.7219644904762),
Offset(8.44921892086567, 39.30598601295708),
Offset(6.665663885818139, 37.25219949595427),
Offset(5.499121280884019, 35.56795083930431),
Offset(4.71934732357969, 34.21549961437258),
Offset(4.191824971897383, 33.150748715599825),
Offset(3.83413008532386, 32.332928091875),
Offset(3.5944086710236895, 31.727343820149756),
Offset(3.439349493531836, 31.30476904158305),
Offset(3.3475444710407203, 31.041028378323645),
Offset(3.3053370544563663, 30.9159905704348),
],
<Offset>[
Offset(44.699999999999996, 12.5),
Offset(44.8127508447183, 12.705337443036306),
Offset(45.196415389958176, 13.442918271778694),
Offset(45.91323796530928, 15.025034714511255),
Offset(46.94374560528654, 18.14128532868387),
Offset(47.67229432158786, 24.60206440861347),
Offset(42.93161554981381, 38.22441326290992),
Offset(28.85755913409393, 47.17636984643584),
Offset(19.5013755304876, 47.24870701527945),
Offset(13.96660294584603, 45.449264405888016),
Offset(10.473697384848128, 43.43654129631442),
Offset(8.160481377396868, 41.60254668518759),
Offset(6.579319534137149, 40.03932330574779),
Offset(5.477070401359516, 38.75266345728148),
Offset(4.70142971314384, 37.722433635593674),
Offset(4.156324376053785, 36.92163061426856),
Offset(3.7795046797885536, 36.32361834062167),
Offset(3.5295932680839, 35.90388374564888),
Offset(3.3789197781081626, 35.640921376003746),
Offset(3.3088909721737494, 35.515989197572516),
],
<Offset>[
Offset(44.699999999999996, 12.5),
Offset(44.8127508447183, 12.705337443036306),
Offset(45.196415389958176, 13.442918271778694),
Offset(45.91323796530928, 15.025034714511255),
Offset(46.94374560528654, 18.14128532868387),
Offset(47.67229432158786, 24.60206440861347),
Offset(42.93161554981381, 38.22441326290992),
Offset(28.85755913409393, 47.17636984643584),
Offset(19.5013755304876, 47.24870701527945),
Offset(13.96660294584603, 45.449264405888016),
Offset(10.473697384848128, 43.43654129631442),
Offset(8.160481377396868, 41.60254668518759),
Offset(6.579319534137149, 40.03932330574779),
Offset(5.477070401359516, 38.75266345728148),
Offset(4.70142971314384, 37.722433635593674),
Offset(4.156324376053785, 36.92163061426856),
Offset(3.7795046797885536, 36.32361834062167),
Offset(3.5295932680839, 35.90388374564888),
Offset(3.3789197781081626, 35.640921376003746),
Offset(3.3088909721737494, 35.515989197572516),
],
),
_PathCubicTo(
<Offset>[
Offset(44.699999999999996, 12.5),
Offset(44.8127508447183, 12.705337443036306),
Offset(45.196415389958176, 13.442918271778694),
Offset(45.91323796530928, 15.025034714511255),
Offset(46.94374560528654, 18.14128532868387),
Offset(47.67229432158786, 24.60206440861347),
Offset(42.93161554981381, 38.22441326290992),
Offset(28.85755913409393, 47.17636984643584),
Offset(19.5013755304876, 47.24870701527945),
Offset(13.96660294584603, 45.449264405888016),
Offset(10.473697384848128, 43.43654129631442),
Offset(8.160481377396868, 41.60254668518759),
Offset(6.579319534137149, 40.03932330574779),
Offset(5.477070401359516, 38.75266345728148),
Offset(4.70142971314384, 37.722433635593674),
Offset(4.156324376053785, 36.92163061426856),
Offset(3.7795046797885536, 36.32361834062167),
Offset(3.5295932680839, 35.90388374564888),
Offset(3.3789197781081626, 35.640921376003746),
Offset(3.3088909721737494, 35.515989197572516),
],
<Offset>[
Offset(12.5, 12.5),
Offset(12.614326453945054, 12.386798981216916),
Offset(13.02901859646552, 11.994269408182586),
Offset(13.938562931222666, 11.222383473001177),
Offset(15.802028876435289, 9.953887745813823),
Offset(19.931119077086663, 8.25375574826962),
Offset(29.821477522711497, 8.814138172215419),
Offset(38.388629307251236, 16.4192779592897),
Offset(40.20171679679066, 22.584241250568667),
Offset(40.057702353728686, 26.578797223330362),
Offset(39.3875843683495, 29.2651920484372),
Offset(38.612911702030125, 31.138824244136487),
Offset(37.87892679924153, 32.477935532975884),
Offset(37.23721730172182, 33.44860191282269),
Offset(36.703224153100756, 34.15520044686847),
Offset(36.277242032808715, 34.6662705791591),
Offset(35.953426323091946, 35.027946279267624),
Offset(35.723396196544755, 35.272177323784426),
Offset(35.57817076186886, 35.42129422653163),
Offset(35.50888136213775, 35.49111177355081),
],
<Offset>[
Offset(12.5, 12.5),
Offset(12.614326453945054, 12.386798981216916),
Offset(13.02901859646552, 11.994269408182586),
Offset(13.938562931222666, 11.222383473001177),
Offset(15.802028876435289, 9.953887745813823),
Offset(19.931119077086663, 8.25375574826962),
Offset(29.821477522711497, 8.814138172215419),
Offset(38.388629307251236, 16.4192779592897),
Offset(40.20171679679066, 22.584241250568667),
Offset(40.057702353728686, 26.578797223330362),
Offset(39.3875843683495, 29.2651920484372),
Offset(38.612911702030125, 31.138824244136487),
Offset(37.87892679924153, 32.477935532975884),
Offset(37.23721730172182, 33.44860191282269),
Offset(36.703224153100756, 34.15520044686847),
Offset(36.277242032808715, 34.6662705791591),
Offset(35.953426323091946, 35.027946279267624),
Offset(35.723396196544755, 35.272177323784426),
Offset(35.57817076186886, 35.42129422653163),
Offset(35.50888136213775, 35.49111177355081),
],
),
_PathCubicTo(
<Offset>[
Offset(12.5, 12.5),
Offset(12.614326453945054, 12.386798981216916),
Offset(13.02901859646552, 11.994269408182586),
Offset(13.938562931222666, 11.222383473001177),
Offset(15.802028876435289, 9.953887745813823),
Offset(19.931119077086663, 8.25375574826962),
Offset(29.821477522711497, 8.814138172215419),
Offset(38.388629307251236, 16.4192779592897),
Offset(40.20171679679066, 22.584241250568667),
Offset(40.057702353728686, 26.578797223330362),
Offset(39.3875843683495, 29.2651920484372),
Offset(38.612911702030125, 31.138824244136487),
Offset(37.87892679924153, 32.477935532975884),
Offset(37.23721730172182, 33.44860191282269),
Offset(36.703224153100756, 34.15520044686847),
Offset(36.277242032808715, 34.6662705791591),
Offset(35.953426323091946, 35.027946279267624),
Offset(35.723396196544755, 35.272177323784426),
Offset(35.57817076186886, 35.42129422653163),
Offset(35.50888136213775, 35.49111177355081),
],
<Offset>[
Offset(12.5, 17.1),
Offset(12.568820959399424, 16.986573894184524),
Offset(12.822068758808932, 16.589611807252965),
Offset(13.395327039578369, 15.790194192156408),
Offset(14.632400650310995, 14.402704421364),
Offset(17.59564641132325, 12.216780783198363),
Offset(25.620009652612282, 10.687015033230036),
Offset(33.99475903765893, 15.057696505981518),
Offset(36.67822168754626, 19.6270496410968),
Offset(37.361921327649014, 22.851497307918553),
Offset(37.36310590436704, 25.13463676507986),
Offset(37.118094210451396, 26.788477054903165),
Offset(36.7987285459884, 28.0065630665324),
Offset(36.479494223942, 28.91143806991379),
Offset(36.1936194118543, 29.58351552687462),
Offset(35.95504774207879, 30.077568056765532),
Offset(35.76833031432708, 30.43167175879571),
Offset(35.63315242199269, 30.673062619718593),
Offset(35.54679545480142, 30.821401228851528),
Offset(35.50532744442037, 30.891113146413097),
],
<Offset>[
Offset(12.5, 17.1),
Offset(12.568820959399424, 16.986573894184524),
Offset(12.822068758808932, 16.589611807252965),
Offset(13.395327039578369, 15.790194192156408),
Offset(14.632400650310995, 14.402704421364),
Offset(17.59564641132325, 12.216780783198363),
Offset(25.620009652612282, 10.687015033230036),
Offset(33.99475903765893, 15.057696505981518),
Offset(36.67822168754626, 19.6270496410968),
Offset(37.361921327649014, 22.851497307918553),
Offset(37.36310590436704, 25.13463676507986),
Offset(37.118094210451396, 26.788477054903165),
Offset(36.7987285459884, 28.0065630665324),
Offset(36.479494223942, 28.91143806991379),
Offset(36.1936194118543, 29.58351552687462),
Offset(35.95504774207879, 30.077568056765532),
Offset(35.76833031432708, 30.43167175879571),
Offset(35.63315242199269, 30.673062619718593),
Offset(35.54679545480142, 30.821401228851528),
Offset(35.50532744442037, 30.891113146413097),
],
),
_PathClose(
),
],
),
_PathFrames(
opacities: <double>[
1.0,
1.0,
1.0,
1.0,
1.0,
0.878048780488,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
],
commands: <_PathCommand>[
_PathMoveTo(
<Offset>[
Offset(12.5, 26.3),
Offset(12.477809970308172, 26.186123720119735),
Offset(12.40816908349576, 25.780296605393723),
Offset(12.308855256289778, 24.925815630466868),
Offset(12.293144198062407, 23.30033777246436),
Offset(12.924701079796437, 20.14283085305585),
Offset(17.217073912413852, 14.432768755259271),
Offset(25.207018498474316, 12.334533599365145),
Offset(29.631231469057468, 13.71266642215307),
Offset(31.970359275489688, 15.396897477094935),
Offset(33.314148976402116, 16.873526198365184),
Offset(34.12845922729394, 18.087782676436515),
Offset(34.638332039482144, 19.063818133645434),
Offset(34.96404806838234, 19.837110384095983),
Offset(35.17440992936138, 20.44014568688693),
Offset(35.31065916061894, 20.900163011978407),
Offset(35.398138296797356, 21.239122717851885),
Offset(35.45266487288856, 21.47483321158692),
Offset(35.484044840666535, 21.62161523349133),
Offset(35.4982196089856, 21.691115892137674),
],
),
_PathCubicTo(
<Offset>[
Offset(12.5, 26.3),
Offset(12.477809970308172, 26.186123720119735),
Offset(12.40816908349576, 25.780296605393723),
Offset(12.308855256289778, 24.925815630466868),
Offset(12.293144198062407, 23.30033777246436),
Offset(12.924701079796437, 20.14283085305585),
Offset(17.217073912413852, 14.432768755259271),
Offset(25.207018498474316, 12.334533599365145),
Offset(29.631231469057468, 13.71266642215307),
Offset(31.970359275489688, 15.396897477094935),
Offset(33.314148976402116, 16.873526198365184),
Offset(34.12845922729394, 18.087782676436515),
Offset(34.638332039482144, 19.063818133645434),
Offset(34.96404806838234, 19.837110384095983),
Offset(35.17440992936138, 20.44014568688693),
Offset(35.31065916061894, 20.900163011978407),
Offset(35.398138296797356, 21.239122717851885),
Offset(35.45266487288856, 21.47483321158692),
Offset(35.484044840666535, 21.62161523349133),
Offset(35.4982196089856, 21.691115892137674),
],
<Offset>[
Offset(44.699999999999996, 26.3),
Offset(44.67623436108142, 26.504662181939125),
Offset(44.57556587698842, 27.22894546898983),
Offset(44.28353029037639, 28.72846687197695),
Offset(43.43486092691366, 31.487735355334408),
Offset(40.665876324297635, 36.4911395133997),
Offset(30.32721193951616, 43.84304384595377),
Offset(15.675948325317012, 43.09162548651128),
Offset(8.930890202754409, 38.37713218686386),
Offset(5.879259867607036, 34.267364659652586),
Offset(4.400261992900747, 31.044875446242393),
Offset(3.676028902660681, 28.551505117487622),
Offset(3.3387247743777593, 26.62520590641735),
Offset(3.2039011680200318, 25.141171928554776),
Offset(3.172615489404464, 24.007378875612137),
Offset(3.18974150386401, 23.155523047087872),
Offset(3.224216653493965, 22.53479477920593),
Offset(3.258861944427707, 22.106539633451376),
Offset(3.2847938569058357, 21.841242382963447),
Offset(3.2982292190216, 21.715993316159373),
],
<Offset>[
Offset(44.699999999999996, 26.3),
Offset(44.67623436108142, 26.504662181939125),
Offset(44.57556587698842, 27.22894546898983),
Offset(44.28353029037639, 28.72846687197695),
Offset(43.43486092691366, 31.487735355334408),
Offset(40.665876324297635, 36.4911395133997),
Offset(30.32721193951616, 43.84304384595377),
Offset(15.675948325317012, 43.09162548651128),
Offset(8.930890202754409, 38.37713218686386),
Offset(5.879259867607036, 34.267364659652586),
Offset(4.400261992900747, 31.044875446242393),
Offset(3.676028902660681, 28.551505117487622),
Offset(3.3387247743777593, 26.62520590641735),
Offset(3.2039011680200318, 25.141171928554776),
Offset(3.172615489404464, 24.007378875612137),
Offset(3.18974150386401, 23.155523047087872),
Offset(3.224216653493965, 22.53479477920593),
Offset(3.258861944427707, 22.106539633451376),
Offset(3.2847938569058357, 21.841242382963447),
Offset(3.2982292190216, 21.715993316159373),
],
),
_PathCubicTo(
<Offset>[
Offset(44.699999999999996, 26.3),
Offset(44.67623436108142, 26.504662181939125),
Offset(44.57556587698842, 27.22894546898983),
Offset(44.28353029037639, 28.72846687197695),
Offset(43.43486092691366, 31.487735355334408),
Offset(40.665876324297635, 36.4911395133997),
Offset(30.32721193951616, 43.84304384595377),
Offset(15.675948325317012, 43.09162548651128),
Offset(8.930890202754409, 38.37713218686386),
Offset(5.879259867607036, 34.267364659652586),
Offset(4.400261992900747, 31.044875446242393),
Offset(3.676028902660681, 28.551505117487622),
Offset(3.3387247743777593, 26.62520590641735),
Offset(3.2039011680200318, 25.141171928554776),
Offset(3.172615489404464, 24.007378875612137),
Offset(3.18974150386401, 23.155523047087872),
Offset(3.224216653493965, 22.53479477920593),
Offset(3.258861944427707, 22.106539633451376),
Offset(3.2847938569058357, 21.841242382963447),
Offset(3.2982292190216, 21.715993316159373),
],
<Offset>[
Offset(44.699999999999996, 21.7),
Offset(44.72173985562705, 21.904887268971517),
Offset(44.782515714645, 22.633603069919452),
Offset(44.82676618202069, 24.16065615282172),
Offset(44.60448915303795, 27.03891867978423),
Offset(43.00134899006105, 32.528114478470954),
Offset(34.528679809615376, 41.970166984939155),
Offset(20.069818594909318, 44.45320693981947),
Offset(12.454385311998806, 41.334323796335724),
Offset(8.575040893686701, 37.99466457506439),
Offset(6.424740456883205, 35.17543072959973),
Offset(5.17084639423941, 32.90185230672094),
Offset(4.418923027630889, 31.096578372860833),
Offset(3.9616242457998574, 29.678335771463676),
Offset(3.6822202306509215, 28.579063795605983),
Offset(3.511935794593935, 27.744225569481436),
Offset(3.409312662258829, 27.131069299677847),
Offset(3.3491057189797715, 26.70565433751721),
Offset(3.316169163973278, 26.441135380643548),
Offset(3.301783136738983, 26.315991943297085),
],
<Offset>[
Offset(44.699999999999996, 21.7),
Offset(44.72173985562705, 21.904887268971517),
Offset(44.782515714645, 22.633603069919452),
Offset(44.82676618202069, 24.16065615282172),
Offset(44.60448915303795, 27.03891867978423),
Offset(43.00134899006105, 32.528114478470954),
Offset(34.528679809615376, 41.970166984939155),
Offset(20.069818594909318, 44.45320693981947),
Offset(12.454385311998806, 41.334323796335724),
Offset(8.575040893686701, 37.99466457506439),
Offset(6.424740456883205, 35.17543072959973),
Offset(5.17084639423941, 32.90185230672094),
Offset(4.418923027630889, 31.096578372860833),
Offset(3.9616242457998574, 29.678335771463676),
Offset(3.6822202306509215, 28.579063795605983),
Offset(3.511935794593935, 27.744225569481436),
Offset(3.409312662258829, 27.131069299677847),
Offset(3.3491057189797715, 26.70565433751721),
Offset(3.316169163973278, 26.441135380643548),
Offset(3.301783136738983, 26.315991943297085),
],
),
_PathCubicTo(
<Offset>[
Offset(44.699999999999996, 21.7),
Offset(44.72173985562705, 21.904887268971517),
Offset(44.782515714645, 22.633603069919452),
Offset(44.82676618202069, 24.16065615282172),
Offset(44.60448915303795, 27.03891867978423),
Offset(43.00134899006105, 32.528114478470954),
Offset(34.528679809615376, 41.970166984939155),
Offset(20.069818594909318, 44.45320693981947),
Offset(12.454385311998806, 41.334323796335724),
Offset(8.575040893686701, 37.99466457506439),
Offset(6.424740456883205, 35.17543072959973),
Offset(5.17084639423941, 32.90185230672094),
Offset(4.418923027630889, 31.096578372860833),
Offset(3.9616242457998574, 29.678335771463676),
Offset(3.6822202306509215, 28.579063795605983),
Offset(3.511935794593935, 27.744225569481436),
Offset(3.409312662258829, 27.131069299677847),
Offset(3.3491057189797715, 26.70565433751721),
Offset(3.316169163973278, 26.441135380643548),
Offset(3.301783136738983, 26.315991943297085),
],
<Offset>[
Offset(12.5, 21.7),
Offset(12.523315464853802, 21.586348807152127),
Offset(12.615118921152348, 21.184954206323344),
Offset(12.852091147934075, 20.35800491131164),
Offset(13.462772424186701, 18.851521096914183),
Offset(15.260173745559845, 16.179805818127107),
Offset(21.418541782513067, 12.559891894244654),
Offset(29.60088876806662, 13.69611505267333),
Offset(33.15472657830186, 16.669858031624937),
Offset(34.66614030156936, 19.124197392506744),
Offset(35.33862744038458, 21.004081481722523),
Offset(35.62327671887267, 22.438129865669836),
Offset(35.718530292735274, 23.535190600088917),
Offset(35.72177114616216, 24.374274227004882),
Offset(35.68401467060784, 25.011830606880775),
Offset(35.632853451348865, 25.48886553437197),
Offset(35.583234305562215, 25.8353972383238),
Offset(35.542908647440626, 26.073947915652752),
Offset(35.51542014773398, 26.22150823117143),
Offset(35.50177352670298, 26.291114519275386),
],
<Offset>[
Offset(12.5, 21.7),
Offset(12.523315464853802, 21.586348807152127),
Offset(12.615118921152348, 21.184954206323344),
Offset(12.852091147934075, 20.35800491131164),
Offset(13.462772424186701, 18.851521096914183),
Offset(15.260173745559845, 16.179805818127107),
Offset(21.418541782513067, 12.559891894244654),
Offset(29.60088876806662, 13.69611505267333),
Offset(33.15472657830186, 16.669858031624937),
Offset(34.66614030156936, 19.124197392506744),
Offset(35.33862744038458, 21.004081481722523),
Offset(35.62327671887267, 22.438129865669836),
Offset(35.718530292735274, 23.535190600088917),
Offset(35.72177114616216, 24.374274227004882),
Offset(35.68401467060784, 25.011830606880775),
Offset(35.632853451348865, 25.48886553437197),
Offset(35.583234305562215, 25.8353972383238),
Offset(35.542908647440626, 26.073947915652752),
Offset(35.51542014773398, 26.22150823117143),
Offset(35.50177352670298, 26.291114519275386),
],
),
_PathCubicTo(
<Offset>[
Offset(12.5, 21.7),
Offset(12.523315464853802, 21.586348807152127),
Offset(12.615118921152348, 21.184954206323344),
Offset(12.852091147934075, 20.35800491131164),
Offset(13.462772424186701, 18.851521096914183),
Offset(15.260173745559845, 16.179805818127107),
Offset(21.418541782513067, 12.559891894244654),
Offset(29.60088876806662, 13.69611505267333),
Offset(33.15472657830186, 16.669858031624937),
Offset(34.66614030156936, 19.124197392506744),
Offset(35.33862744038458, 21.004081481722523),
Offset(35.62327671887267, 22.438129865669836),
Offset(35.718530292735274, 23.535190600088917),
Offset(35.72177114616216, 24.374274227004882),
Offset(35.68401467060784, 25.011830606880775),
Offset(35.632853451348865, 25.48886553437197),
Offset(35.583234305562215, 25.8353972383238),
Offset(35.542908647440626, 26.073947915652752),
Offset(35.51542014773398, 26.22150823117143),
Offset(35.50177352670298, 26.291114519275386),
],
<Offset>[
Offset(12.5, 26.3),
Offset(12.477809970308172, 26.186123720119735),
Offset(12.40816908349576, 25.780296605393723),
Offset(12.308855256289778, 24.925815630466868),
Offset(12.293144198062407, 23.30033777246436),
Offset(12.924701079796437, 20.14283085305585),
Offset(17.217073912413852, 14.432768755259271),
Offset(25.207018498474316, 12.334533599365145),
Offset(29.631231469057468, 13.71266642215307),
Offset(31.970359275489688, 15.396897477094935),
Offset(33.314148976402116, 16.873526198365184),
Offset(34.12845922729394, 18.087782676436515),
Offset(34.638332039482144, 19.063818133645434),
Offset(34.96404806838234, 19.837110384095983),
Offset(35.17440992936138, 20.44014568688693),
Offset(35.31065916061894, 20.900163011978407),
Offset(35.398138296797356, 21.239122717851885),
Offset(35.45266487288856, 21.47483321158692),
Offset(35.484044840666535, 21.62161523349133),
Offset(35.4982196089856, 21.691115892137674),
],
<Offset>[
Offset(12.5, 26.3),
Offset(12.477809970308172, 26.186123720119735),
Offset(12.40816908349576, 25.780296605393723),
Offset(12.308855256289778, 24.925815630466868),
Offset(12.293144198062407, 23.30033777246436),
Offset(12.924701079796437, 20.14283085305585),
Offset(17.217073912413852, 14.432768755259271),
Offset(25.207018498474316, 12.334533599365145),
Offset(29.631231469057468, 13.71266642215307),
Offset(31.970359275489688, 15.396897477094935),
Offset(33.314148976402116, 16.873526198365184),
Offset(34.12845922729394, 18.087782676436515),
Offset(34.638332039482144, 19.063818133645434),
Offset(34.96404806838234, 19.837110384095983),
Offset(35.17440992936138, 20.44014568688693),
Offset(35.31065916061894, 20.900163011978407),
Offset(35.398138296797356, 21.239122717851885),
Offset(35.45266487288856, 21.47483321158692),
Offset(35.484044840666535, 21.62161523349133),
Offset(35.4982196089856, 21.691115892137674),
],
),
_PathClose(
),
],
),
_PathFrames(
opacities: <double>[
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.146341463415,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
],
commands: <_PathCommand>[
_PathMoveTo(
<Offset>[
Offset(18.039538499999995, 12.930571500000006),
Offset(18.149334465395803, 12.872149290550801),
Offset(18.543577170010774, 12.67362376971493),
Offset(19.38848933269092, 12.304132440263823),
Offset(21.0500251098891, 11.778829975926628),
Offset(24.4849959176686, 11.43667565110878),
Offset(31.716380432411114, 14.006619703548635),
Offset(36.563833612934715, 21.53883416894973),
Offset(36.92848913752976, 26.678594000151676),
Offset(36.41588677676291, 30.008169262247456),
Offset(35.68873044963835, 32.36483086720799),
Offset(34.89395296392378, 34.0653568909929),
Offset(34.11750536482414, 35.28323166524228),
Offset(33.42442890399698, 36.15784461978932),
Offset(32.840093239206396, 36.785183822829495),
Offset(32.36951533303179, 37.23048479128569),
Offset(32.00877148413249, 37.538392723203316),
Offset(31.749801205381853, 37.7397340593929),
Offset(31.58332657425492, 37.85607615398918),
Offset(31.500705947534364, 37.904137673197035),
],
),
_PathCubicTo(
<Offset>[
Offset(18.039538499999995, 12.930571500000006),
Offset(18.149334465395803, 12.872149290550801),
Offset(18.543577170010774, 12.67362376971493),
Offset(19.38848933269092, 12.304132440263823),
Offset(21.0500251098891, 11.778829975926628),
Offset(24.4849959176686, 11.43667565110878),
Offset(31.716380432411114, 14.006619703548635),
Offset(36.563833612934715, 21.53883416894973),
Offset(36.92848913752976, 26.678594000151676),
Offset(36.41588677676291, 30.008169262247456),
Offset(35.68873044963835, 32.36483086720799),
Offset(34.89395296392378, 34.0653568909929),
Offset(34.11750536482414, 35.28323166524228),
Offset(33.42442890399698, 36.15784461978932),
Offset(32.840093239206396, 36.785183822829495),
Offset(32.36951533303179, 37.23048479128569),
Offset(32.00877148413249, 37.538392723203316),
Offset(31.749801205381853, 37.7397340593929),
Offset(31.58332657425492, 37.85607615398918),
Offset(31.500705947534364, 37.904137673197035),
],
<Offset>[
Offset(9.524593499999996, 12.930571500000006),
Offset(9.63480611837429, 12.787915207234757),
Offset(10.037253738651572, 12.290544098974763),
Offset(10.933129105730652, 11.298562062138357),
Offset(12.814931782195051, 9.613760407253604),
Offset(17.148837885012377, 7.11336292762574),
Offset(28.234762045851944, 6.196224855085145),
Offset(39.13042441508561, 13.256357206311968),
Offset(42.67716555792793, 19.829043505343183),
Offset(43.985492641283884, 24.533428745633444),
Offset(44.43019441391232, 28.080441886710624),
Offset(44.394288300179475, 30.80095825365075),
Offset(44.09477826399472, 32.872912945700186),
Offset(43.700712499650194, 34.44166739898953),
Offset(43.302847476418705, 35.61890284347735),
Offset(42.94671302192797, 36.48781021374379),
Offset(42.653748813975184, 37.109710143785925),
Offset(42.43168887555528, 37.5301341853464),
Offset(42.28113740093583, 37.78310769585204),
Offset(42.20064775415372, 37.89587099404257),
],
<Offset>[
Offset(9.524593499999996, 12.930571500000006),
Offset(9.63480611837429, 12.787915207234757),
Offset(10.037253738651572, 12.290544098974763),
Offset(10.933129105730652, 11.298562062138357),
Offset(12.814931782195051, 9.613760407253604),
Offset(17.148837885012377, 7.11336292762574),
Offset(28.234762045851944, 6.196224855085145),
Offset(39.13042441508561, 13.256357206311968),
Offset(42.67716555792793, 19.829043505343183),
Offset(43.985492641283884, 24.533428745633444),
Offset(44.43019441391232, 28.080441886710624),
Offset(44.394288300179475, 30.80095825365075),
Offset(44.09477826399472, 32.872912945700186),
Offset(43.700712499650194, 34.44166739898953),
Offset(43.302847476418705, 35.61890284347735),
Offset(42.94671302192797, 36.48781021374379),
Offset(42.653748813975184, 37.109710143785925),
Offset(42.43168887555528, 37.5301341853464),
Offset(42.28113740093583, 37.78310769585204),
Offset(42.20064775415372, 37.89587099404257),
],
),
_PathCubicTo(
<Offset>[
Offset(9.524593499999996, 12.930571500000006),
Offset(9.63480611837429, 12.787915207234757),
Offset(10.037253738651572, 12.290544098974763),
Offset(10.933129105730652, 11.298562062138357),
Offset(12.814931782195051, 9.613760407253604),
Offset(17.148837885012377, 7.11336292762574),
Offset(28.234762045851944, 6.196224855085145),
Offset(39.13042441508561, 13.256357206311968),
Offset(42.67716555792793, 19.829043505343183),
Offset(43.985492641283884, 24.533428745633444),
Offset(44.43019441391232, 28.080441886710624),
Offset(44.394288300179475, 30.80095825365075),
Offset(44.09477826399472, 32.872912945700186),
Offset(43.700712499650194, 34.44166739898953),
Offset(43.302847476418705, 35.61890284347735),
Offset(42.94671302192797, 36.48781021374379),
Offset(42.653748813975184, 37.109710143785925),
Offset(42.43168887555528, 37.5301341853464),
Offset(42.28113740093583, 37.78310769585204),
Offset(42.20064775415372, 37.89587099404257),
],
<Offset>[
Offset(9.524593499999998, 23.148505500000006),
Offset(9.533725218395034, 23.005349223660573),
Offset(9.577558133763372, 22.498132216605804),
Offset(9.726444651980092, 21.44499433449068),
Offset(10.216848299787422, 19.495872400486462),
Offset(11.960862616832728, 15.916752566813207),
Offset(18.862288227695757, 10.374166918956151),
Offset(29.191452059920294, 10.176448243730892),
Offset(34.457704964157735, 12.93063180086538),
Offset(37.415804021347064, 15.449901708208273),
Offset(39.288927637315474, 17.590685129581864),
Offset(40.4770099353689, 19.400555850143917),
Offset(41.202395800544195, 20.900185466695486),
Offset(41.64129983469044, 22.110127084205665),
Offset(41.90331030119613, 23.06359775882259),
Offset(42.055503528877686, 23.79517298706838),
Offset(42.13932971867431, 24.335737347974696),
Offset(42.18016902669948, 24.711868981138284),
Offset(42.19357525117126, 24.945734703834944),
Offset(42.19072773916836, 25.055940826099334),
],
<Offset>[
Offset(9.524593499999998, 23.148505500000006),
Offset(9.533725218395034, 23.005349223660573),
Offset(9.577558133763372, 22.498132216605804),
Offset(9.726444651980092, 21.44499433449068),
Offset(10.216848299787422, 19.495872400486462),
Offset(11.960862616832728, 15.916752566813207),
Offset(18.862288227695757, 10.374166918956151),
Offset(29.191452059920294, 10.176448243730892),
Offset(34.457704964157735, 12.93063180086538),
Offset(37.415804021347064, 15.449901708208273),
Offset(39.288927637315474, 17.590685129581864),
Offset(40.4770099353689, 19.400555850143917),
Offset(41.202395800544195, 20.900185466695486),
Offset(41.64129983469044, 22.110127084205665),
Offset(41.90331030119613, 23.06359775882259),
Offset(42.055503528877686, 23.79517298706838),
Offset(42.13932971867431, 24.335737347974696),
Offset(42.18016902669948, 24.711868981138284),
Offset(42.19357525117126, 24.945734703834944),
Offset(42.19072773916836, 25.055940826099334),
],
),
_PathCubicTo(
<Offset>[
Offset(9.524593499999998, 23.148505500000006),
Offset(9.533725218395034, 23.005349223660573),
Offset(9.577558133763372, 22.498132216605804),
Offset(9.726444651980092, 21.44499433449068),
Offset(10.216848299787422, 19.495872400486462),
Offset(11.960862616832728, 15.916752566813207),
Offset(18.862288227695757, 10.374166918956151),
Offset(29.191452059920294, 10.176448243730892),
Offset(34.457704964157735, 12.93063180086538),
Offset(37.415804021347064, 15.449901708208273),
Offset(39.288927637315474, 17.590685129581864),
Offset(40.4770099353689, 19.400555850143917),
Offset(41.202395800544195, 20.900185466695486),
Offset(41.64129983469044, 22.110127084205665),
Offset(41.90331030119613, 23.06359775882259),
Offset(42.055503528877686, 23.79517298706838),
Offset(42.13932971867431, 24.335737347974696),
Offset(42.18016902669948, 24.711868981138284),
Offset(42.19357525117126, 24.945734703834944),
Offset(42.19072773916836, 25.055940826099334),
],
<Offset>[
Offset(18.0395385, 23.148505500000006),
Offset(18.048253565416548, 23.089583306976618),
Offset(18.083881565122574, 22.88121188734597),
Offset(18.181804878940362, 22.450564712616142),
Offset(18.45194162748147, 21.660941969159484),
Offset(19.29702064948895, 20.240065290296247),
Offset(22.343906614254927, 18.18456176741964),
Offset(26.6248612577694, 18.458925206368654),
Offset(28.709028543759565, 19.78018229567387),
Offset(29.84619815682609, 20.924642224822286),
Offset(30.547463673041506, 21.875074110079233),
Offset(30.976674599113203, 22.664954487486067),
Offset(31.225122901373616, 23.310504186237587),
Offset(31.365016239037228, 23.82630430500546),
Offset(31.440556063983824, 24.229878738174733),
Offset(31.47830583998151, 24.53784756461028),
Offset(31.49435238883162, 24.76441992739209),
Offset(31.498281356526046, 24.921468855184788),
Offset(31.495764424490346, 25.018703161972084),
Offset(31.490785932549, 25.064207505253805),
],
<Offset>[
Offset(18.0395385, 23.148505500000006),
Offset(18.048253565416548, 23.089583306976618),
Offset(18.083881565122574, 22.88121188734597),
Offset(18.181804878940362, 22.450564712616142),
Offset(18.45194162748147, 21.660941969159484),
Offset(19.29702064948895, 20.240065290296247),
Offset(22.343906614254927, 18.18456176741964),
Offset(26.6248612577694, 18.458925206368654),
Offset(28.709028543759565, 19.78018229567387),
Offset(29.84619815682609, 20.924642224822286),
Offset(30.547463673041506, 21.875074110079233),
Offset(30.976674599113203, 22.664954487486067),
Offset(31.225122901373616, 23.310504186237587),
Offset(31.365016239037228, 23.82630430500546),
Offset(31.440556063983824, 24.229878738174733),
Offset(31.47830583998151, 24.53784756461028),
Offset(31.49435238883162, 24.76441992739209),
Offset(31.498281356526046, 24.921468855184788),
Offset(31.495764424490346, 25.018703161972084),
Offset(31.490785932549, 25.064207505253805),
],
),
_PathCubicTo(
<Offset>[
Offset(18.0395385, 23.148505500000006),
Offset(18.048253565416548, 23.089583306976618),
Offset(18.083881565122574, 22.88121188734597),
Offset(18.181804878940362, 22.450564712616142),
Offset(18.45194162748147, 21.660941969159484),
Offset(19.29702064948895, 20.240065290296247),
Offset(22.343906614254927, 18.18456176741964),
Offset(26.6248612577694, 18.458925206368654),
Offset(28.709028543759565, 19.78018229567387),
Offset(29.84619815682609, 20.924642224822286),
Offset(30.547463673041506, 21.875074110079233),
Offset(30.976674599113203, 22.664954487486067),
Offset(31.225122901373616, 23.310504186237587),
Offset(31.365016239037228, 23.82630430500546),
Offset(31.440556063983824, 24.229878738174733),
Offset(31.47830583998151, 24.53784756461028),
Offset(31.49435238883162, 24.76441992739209),
Offset(31.498281356526046, 24.921468855184788),
Offset(31.495764424490346, 25.018703161972084),
Offset(31.490785932549, 25.064207505253805),
],
<Offset>[
Offset(18.039538499999995, 12.930571500000006),
Offset(18.149334465395803, 12.872149290550801),
Offset(18.543577170010774, 12.67362376971493),
Offset(19.38848933269092, 12.304132440263823),
Offset(21.0500251098891, 11.778829975926628),
Offset(24.4849959176686, 11.43667565110878),
Offset(31.716380432411114, 14.006619703548635),
Offset(36.563833612934715, 21.53883416894973),
Offset(36.92848913752976, 26.678594000151676),
Offset(36.41588677676291, 30.008169262247456),
Offset(35.68873044963835, 32.36483086720799),
Offset(34.89395296392378, 34.0653568909929),
Offset(34.11750536482414, 35.28323166524228),
Offset(33.42442890399698, 36.15784461978932),
Offset(32.840093239206396, 36.785183822829495),
Offset(32.36951533303179, 37.23048479128569),
Offset(32.00877148413249, 37.538392723203316),
Offset(31.749801205381853, 37.7397340593929),
Offset(31.58332657425492, 37.85607615398918),
Offset(31.500705947534364, 37.904137673197035),
],
<Offset>[
Offset(18.039538499999995, 12.930571500000006),
Offset(18.149334465395803, 12.872149290550801),
Offset(18.543577170010774, 12.67362376971493),
Offset(19.38848933269092, 12.304132440263823),
Offset(21.0500251098891, 11.778829975926628),
Offset(24.4849959176686, 11.43667565110878),
Offset(31.716380432411114, 14.006619703548635),
Offset(36.563833612934715, 21.53883416894973),
Offset(36.92848913752976, 26.678594000151676),
Offset(36.41588677676291, 30.008169262247456),
Offset(35.68873044963835, 32.36483086720799),
Offset(34.89395296392378, 34.0653568909929),
Offset(34.11750536482414, 35.28323166524228),
Offset(33.42442890399698, 36.15784461978932),
Offset(32.840093239206396, 36.785183822829495),
Offset(32.36951533303179, 37.23048479128569),
Offset(32.00877148413249, 37.538392723203316),
Offset(31.749801205381853, 37.7397340593929),
Offset(31.58332657425492, 37.85607615398918),
Offset(31.500705947534364, 37.904137673197035),
],
),
_PathClose(
),
],
),
_PathFrames(
opacities: <double>[
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.146341463415,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
],
commands: <_PathCommand>[
_PathMoveTo(
<Offset>[
Offset(38.4754065, 24.8514945),
Offset(38.466274781604966, 24.99465077633943),
Offset(38.42244186623663, 25.501867783394207),
Offset(38.27355534801991, 26.555005665509313),
Offset(37.78315170021258, 28.504127599513545),
Offset(36.03913738316727, 32.08324743318679),
Offset(29.137711772304243, 37.62583308104385),
Offset(18.8085479400797, 37.8235517562691),
Offset(13.542295035842265, 35.06936819913462),
Offset(10.58419597865294, 32.55009829179173),
Offset(8.71107236268452, 30.409314870418136),
Offset(7.522990064631102, 28.599444149856083),
Offset(6.797604199455802, 27.099814533304514),
Offset(6.358700165309552, 25.889872915794328),
Offset(6.096689698803871, 24.93640224117742),
Offset(5.94449647112231, 24.204827012931613),
Offset(5.860670281325686, 23.6642626520253),
Offset(5.819830973300516, 23.288131018861716),
Offset(5.806424748828734, 23.05426529616505),
Offset(5.809272260831642, 22.944059173900662),
],
),
_PathCubicTo(
<Offset>[
Offset(38.4754065, 24.8514945),
Offset(38.466274781604966, 24.99465077633943),
Offset(38.42244186623663, 25.501867783394207),
Offset(38.27355534801991, 26.555005665509313),
Offset(37.78315170021258, 28.504127599513545),
Offset(36.03913738316727, 32.08324743318679),
Offset(29.137711772304243, 37.62583308104385),
Offset(18.8085479400797, 37.8235517562691),
Offset(13.542295035842265, 35.06936819913462),
Offset(10.58419597865294, 32.55009829179173),
Offset(8.71107236268452, 30.409314870418136),
Offset(7.522990064631102, 28.599444149856083),
Offset(6.797604199455802, 27.099814533304514),
Offset(6.358700165309552, 25.889872915794328),
Offset(6.096689698803871, 24.93640224117742),
Offset(5.94449647112231, 24.204827012931613),
Offset(5.860670281325686, 23.6642626520253),
Offset(5.819830973300516, 23.288131018861716),
Offset(5.806424748828734, 23.05426529616505),
Offset(5.809272260831642, 22.944059173900662),
],
<Offset>[
Offset(29.9604615, 24.8514945),
Offset(29.951746434583455, 24.910416693023386),
Offset(29.91611843487743, 25.11878811265404),
Offset(29.818195121059638, 25.54943528738385),
Offset(29.54805837251853, 26.339058030840523),
Offset(28.702979350511054, 27.759934709703753),
Offset(25.656093385745073, 29.81543823258036),
Offset(21.375138742230593, 29.54107479363134),
Offset(19.290971456240435, 28.21981770432613),
Offset(18.153801843173916, 27.07535777517771),
Offset(17.452536326958487, 26.124925889920767),
Offset(17.023325400886797, 25.335045512513933),
Offset(16.774877098626384, 24.689495813762413),
Offset(16.63498376096277, 24.17369569499453),
Offset(16.559443936016173, 23.770121261825274),
Offset(16.521694160018484, 23.46215243538971),
Offset(16.505647611168378, 23.235580072607906),
Offset(16.501718643473946, 23.078531144815212),
Offset(16.504235575509647, 22.98129683802791),
Offset(16.509214067451, 22.93579249474619),
],
<Offset>[
Offset(29.9604615, 24.8514945),
Offset(29.951746434583455, 24.910416693023386),
Offset(29.91611843487743, 25.11878811265404),
Offset(29.818195121059638, 25.54943528738385),
Offset(29.54805837251853, 26.339058030840523),
Offset(28.702979350511054, 27.759934709703753),
Offset(25.656093385745073, 29.81543823258036),
Offset(21.375138742230593, 29.54107479363134),
Offset(19.290971456240435, 28.21981770432613),
Offset(18.153801843173916, 27.07535777517771),
Offset(17.452536326958487, 26.124925889920767),
Offset(17.023325400886797, 25.335045512513933),
Offset(16.774877098626384, 24.689495813762413),
Offset(16.63498376096277, 24.17369569499453),
Offset(16.559443936016173, 23.770121261825274),
Offset(16.521694160018484, 23.46215243538971),
Offset(16.505647611168378, 23.235580072607906),
Offset(16.501718643473946, 23.078531144815212),
Offset(16.504235575509647, 22.98129683802791),
Offset(16.509214067451, 22.93579249474619),
],
),
_PathCubicTo(
<Offset>[
Offset(29.9604615, 24.8514945),
Offset(29.951746434583455, 24.910416693023386),
Offset(29.91611843487743, 25.11878811265404),
Offset(29.818195121059638, 25.54943528738385),
Offset(29.54805837251853, 26.339058030840523),
Offset(28.702979350511054, 27.759934709703753),
Offset(25.656093385745073, 29.81543823258036),
Offset(21.375138742230593, 29.54107479363134),
Offset(19.290971456240435, 28.21981770432613),
Offset(18.153801843173916, 27.07535777517771),
Offset(17.452536326958487, 26.124925889920767),
Offset(17.023325400886797, 25.335045512513933),
Offset(16.774877098626384, 24.689495813762413),
Offset(16.63498376096277, 24.17369569499453),
Offset(16.559443936016173, 23.770121261825274),
Offset(16.521694160018484, 23.46215243538971),
Offset(16.505647611168378, 23.235580072607906),
Offset(16.501718643473946, 23.078531144815212),
Offset(16.504235575509647, 22.98129683802791),
Offset(16.509214067451, 22.93579249474619),
],
<Offset>[
Offset(29.9604615, 35.0694285),
Offset(29.8506655346042, 35.1278507094492),
Offset(29.45642282998923, 35.326376230285085),
Offset(28.61151066730908, 35.69586755973617),
Offset(26.9499748901109, 36.22117002407338),
Offset(23.515004082331405, 36.56332434889122),
Offset(16.283619567588886, 33.99338029645136),
Offset(11.43616638706528, 26.461165831050263),
Offset(11.071510862470241, 21.321405999848324),
Offset(11.5841132232371, 17.99183073775254),
Offset(12.311269550361642, 15.635169132792008),
Offset(13.10604703607622, 13.934643109007098),
Offset(13.882494635175863, 12.716768334757713),
Offset(14.575571096003015, 11.84215538021067),
Offset(15.159906760793596, 11.214816177170512),
Offset(15.630484666968204, 10.7695152087143),
Offset(15.991228515867505, 10.461607276796677),
Offset(16.250198794618143, 10.260265940607095),
Offset(16.416673425745074, 10.143923846010813),
Offset(16.49929405246564, 10.095862326802958),
],
<Offset>[
Offset(29.9604615, 35.0694285),
Offset(29.8506655346042, 35.1278507094492),
Offset(29.45642282998923, 35.326376230285085),
Offset(28.61151066730908, 35.69586755973617),
Offset(26.9499748901109, 36.22117002407338),
Offset(23.515004082331405, 36.56332434889122),
Offset(16.283619567588886, 33.99338029645136),
Offset(11.43616638706528, 26.461165831050263),
Offset(11.071510862470241, 21.321405999848324),
Offset(11.5841132232371, 17.99183073775254),
Offset(12.311269550361642, 15.635169132792008),
Offset(13.10604703607622, 13.934643109007098),
Offset(13.882494635175863, 12.716768334757713),
Offset(14.575571096003015, 11.84215538021067),
Offset(15.159906760793596, 11.214816177170512),
Offset(15.630484666968204, 10.7695152087143),
Offset(15.991228515867505, 10.461607276796677),
Offset(16.250198794618143, 10.260265940607095),
Offset(16.416673425745074, 10.143923846010813),
Offset(16.49929405246564, 10.095862326802958),
],
),
_PathCubicTo(
<Offset>[
Offset(29.9604615, 35.0694285),
Offset(29.8506655346042, 35.1278507094492),
Offset(29.45642282998923, 35.326376230285085),
Offset(28.61151066730908, 35.69586755973617),
Offset(26.9499748901109, 36.22117002407338),
Offset(23.515004082331405, 36.56332434889122),
Offset(16.283619567588886, 33.99338029645136),
Offset(11.43616638706528, 26.461165831050263),
Offset(11.071510862470241, 21.321405999848324),
Offset(11.5841132232371, 17.99183073775254),
Offset(12.311269550361642, 15.635169132792008),
Offset(13.10604703607622, 13.934643109007098),
Offset(13.882494635175863, 12.716768334757713),
Offset(14.575571096003015, 11.84215538021067),
Offset(15.159906760793596, 11.214816177170512),
Offset(15.630484666968204, 10.7695152087143),
Offset(15.991228515867505, 10.461607276796677),
Offset(16.250198794618143, 10.260265940607095),
Offset(16.416673425745074, 10.143923846010813),
Offset(16.49929405246564, 10.095862326802958),
],
<Offset>[
Offset(38.4754065, 35.0694285),
Offset(38.365193881625714, 35.212084792765246),
Offset(37.96274626134843, 35.70945590102525),
Offset(37.06687089426935, 36.701437937861634),
Offset(35.18506821780495, 38.386239592746406),
Offset(30.851162114987627, 40.886637072374256),
Offset(19.765237954148056, 41.80377514491485),
Offset(8.869575584914383, 34.743642793688025),
Offset(5.3228344420720735, 28.170956494656817),
Offset(4.0145073587161235, 23.466571254366553),
Offset(3.5698055860876767, 19.919558113289376),
Offset(3.6057116998205245, 17.19904174634925),
Offset(3.90522173600528, 15.127087054299814),
Offset(4.299287500349799, 13.558332601010466),
Offset(4.697152523581295, 12.381097156522657),
Offset(5.053286978072029, 11.5121897862562),
Offset(5.346251186024813, 10.890289856214071),
Offset(5.568311124444711, 10.469865814653598),
Offset(5.7188625990641615, 10.216892304147956),
Offset(5.799352245846278, 10.104129005957429),
],
<Offset>[
Offset(38.4754065, 35.0694285),
Offset(38.365193881625714, 35.212084792765246),
Offset(37.96274626134843, 35.70945590102525),
Offset(37.06687089426935, 36.701437937861634),
Offset(35.18506821780495, 38.386239592746406),
Offset(30.851162114987627, 40.886637072374256),
Offset(19.765237954148056, 41.80377514491485),
Offset(8.869575584914383, 34.743642793688025),
Offset(5.3228344420720735, 28.170956494656817),
Offset(4.0145073587161235, 23.466571254366553),
Offset(3.5698055860876767, 19.919558113289376),
Offset(3.6057116998205245, 17.19904174634925),
Offset(3.90522173600528, 15.127087054299814),
Offset(4.299287500349799, 13.558332601010466),
Offset(4.697152523581295, 12.381097156522657),
Offset(5.053286978072029, 11.5121897862562),
Offset(5.346251186024813, 10.890289856214071),
Offset(5.568311124444711, 10.469865814653598),
Offset(5.7188625990641615, 10.216892304147956),
Offset(5.799352245846278, 10.104129005957429),
],
),
_PathCubicTo(
<Offset>[
Offset(38.4754065, 35.0694285),
Offset(38.365193881625714, 35.212084792765246),
Offset(37.96274626134843, 35.70945590102525),
Offset(37.06687089426935, 36.701437937861634),
Offset(35.18506821780495, 38.386239592746406),
Offset(30.851162114987627, 40.886637072374256),
Offset(19.765237954148056, 41.80377514491485),
Offset(8.869575584914383, 34.743642793688025),
Offset(5.3228344420720735, 28.170956494656817),
Offset(4.0145073587161235, 23.466571254366553),
Offset(3.5698055860876767, 19.919558113289376),
Offset(3.6057116998205245, 17.19904174634925),
Offset(3.90522173600528, 15.127087054299814),
Offset(4.299287500349799, 13.558332601010466),
Offset(4.697152523581295, 12.381097156522657),
Offset(5.053286978072029, 11.5121897862562),
Offset(5.346251186024813, 10.890289856214071),
Offset(5.568311124444711, 10.469865814653598),
Offset(5.7188625990641615, 10.216892304147956),
Offset(5.799352245846278, 10.104129005957429),
],
<Offset>[
Offset(38.4754065, 24.8514945),
Offset(38.466274781604966, 24.99465077633943),
Offset(38.42244186623663, 25.501867783394207),
Offset(38.27355534801991, 26.555005665509313),
Offset(37.78315170021258, 28.504127599513545),
Offset(36.03913738316727, 32.08324743318679),
Offset(29.137711772304243, 37.62583308104385),
Offset(18.8085479400797, 37.8235517562691),
Offset(13.542295035842265, 35.06936819913462),
Offset(10.58419597865294, 32.55009829179173),
Offset(8.71107236268452, 30.409314870418136),
Offset(7.522990064631102, 28.599444149856083),
Offset(6.797604199455802, 27.099814533304514),
Offset(6.358700165309552, 25.889872915794328),
Offset(6.096689698803871, 24.93640224117742),
Offset(5.94449647112231, 24.204827012931613),
Offset(5.860670281325686, 23.6642626520253),
Offset(5.819830973300516, 23.288131018861716),
Offset(5.806424748828734, 23.05426529616505),
Offset(5.809272260831642, 22.944059173900662),
],
<Offset>[
Offset(38.4754065, 24.8514945),
Offset(38.466274781604966, 24.99465077633943),
Offset(38.42244186623663, 25.501867783394207),
Offset(38.27355534801991, 26.555005665509313),
Offset(37.78315170021258, 28.504127599513545),
Offset(36.03913738316727, 32.08324743318679),
Offset(29.137711772304243, 37.62583308104385),
Offset(18.8085479400797, 37.8235517562691),
Offset(13.542295035842265, 35.06936819913462),
Offset(10.58419597865294, 32.55009829179173),
Offset(8.71107236268452, 30.409314870418136),
Offset(7.522990064631102, 28.599444149856083),
Offset(6.797604199455802, 27.099814533304514),
Offset(6.358700165309552, 25.889872915794328),
Offset(6.096689698803871, 24.93640224117742),
Offset(5.94449647112231, 24.204827012931613),
Offset(5.860670281325686, 23.6642626520253),
Offset(5.819830973300516, 23.288131018861716),
Offset(5.806424748828734, 23.05426529616505),
Offset(5.809272260831642, 22.944059173900662),
],
),
_PathClose(
),
],
),
_PathFrames(
opacities: <double>[
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.146341463415,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
],
commands: <_PathCommand>[
_PathMoveTo(
<Offset>[
Offset(28.2574725, 24.8514945),
Offset(28.248840765179153, 24.893569876360175),
Offset(28.214853748605588, 25.042172178506007),
Offset(28.12712307566759, 25.34832121175876),
Offset(27.90103970697972, 25.90604411710592),
Offset(27.235747743979807, 26.895272165007142),
Offset(24.959769708433235, 28.253359262887663),
Offset(21.888456902660778, 27.88457940110379),
Offset(20.440706740320067, 26.84990760536443),
Offset(19.66772301607811, 25.980409671854908),
Offset(19.20082911981328, 25.26804809382129),
Offset(18.92339246813794, 24.682165785045505),
Offset(18.770331678460497, 24.207432069853994),
Offset(18.690240480093415, 23.830460250834577),
Offset(18.651994783458633, 23.536865065954846),
Offset(18.637133697797722, 23.313617519881333),
Offset(18.634643077136914, 23.149843556724427),
Offset(18.638096177508633, 23.03661117000591),
Offset(18.643797740845827, 22.966703146400476),
Offset(18.649202428774874, 22.9341391589153),
],
),
_PathCubicTo(
<Offset>[
Offset(28.2574725, 24.8514945),
Offset(28.248840765179153, 24.893569876360175),
Offset(28.214853748605588, 25.042172178506007),
Offset(28.12712307566759, 25.34832121175876),
Offset(27.90103970697972, 25.90604411710592),
Offset(27.235747743979807, 26.895272165007142),
Offset(24.959769708433235, 28.253359262887663),
Offset(21.888456902660778, 27.88457940110379),
Offset(20.440706740320067, 26.84990760536443),
Offset(19.66772301607811, 25.980409671854908),
Offset(19.20082911981328, 25.26804809382129),
Offset(18.92339246813794, 24.682165785045505),
Offset(18.770331678460497, 24.207432069853994),
Offset(18.690240480093415, 23.830460250834577),
Offset(18.651994783458633, 23.536865065954846),
Offset(18.637133697797722, 23.313617519881333),
Offset(18.634643077136914, 23.149843556724427),
Offset(18.638096177508633, 23.03661117000591),
Offset(18.643797740845827, 22.966703146400476),
Offset(18.649202428774874, 22.9341391589153),
],
<Offset>[
Offset(19.7425275, 24.8514945),
Offset(19.73431241815764, 24.80933579304413),
Offset(19.708530317246385, 24.65909250776584),
Offset(19.67176284870732, 24.34275083363329),
Offset(19.66594637928567, 23.740974548432895),
Offset(19.899589711323586, 22.5719594415241),
Offset(21.478151321874066, 20.442964414424175),
Offset(24.455047704811673, 19.602102438466027),
Offset(26.189383160718236, 20.00035711055594),
Offset(27.237328880599087, 20.505669155240895),
Offset(27.942293084087247, 20.983659113323917),
Offset(28.423727804393636, 21.417767147703355),
Offset(28.74760457763108, 21.797113350311893),
Offset(28.96652407574663, 22.11428303003478),
Offset(29.114749020670935, 22.3705840866027),
Offset(29.2143313866939, 22.570942942339432),
Offset(29.279620406979603, 22.721160977307033),
Offset(29.319983847682064, 22.827011295959405),
Offset(29.34160856752674, 22.893734688263336),
Offset(29.349144235394235, 22.92587247976083),
],
<Offset>[
Offset(19.7425275, 24.8514945),
Offset(19.73431241815764, 24.80933579304413),
Offset(19.708530317246385, 24.65909250776584),
Offset(19.67176284870732, 24.34275083363329),
Offset(19.66594637928567, 23.740974548432895),
Offset(19.899589711323586, 22.5719594415241),
Offset(21.478151321874066, 20.442964414424175),
Offset(24.455047704811673, 19.602102438466027),
Offset(26.189383160718236, 20.00035711055594),
Offset(27.237328880599087, 20.505669155240895),
Offset(27.942293084087247, 20.983659113323917),
Offset(28.423727804393636, 21.417767147703355),
Offset(28.74760457763108, 21.797113350311893),
Offset(28.96652407574663, 22.11428303003478),
Offset(29.114749020670935, 22.3705840866027),
Offset(29.2143313866939, 22.570942942339432),
Offset(29.279620406979603, 22.721160977307033),
Offset(29.319983847682064, 22.827011295959405),
Offset(29.34160856752674, 22.893734688263336),
Offset(29.349144235394235, 22.92587247976083),
],
),
_PathCubicTo(
<Offset>[
Offset(19.7425275, 24.8514945),
Offset(19.73431241815764, 24.80933579304413),
Offset(19.708530317246385, 24.65909250776584),
Offset(19.67176284870732, 24.34275083363329),
Offset(19.66594637928567, 23.740974548432895),
Offset(19.899589711323586, 22.5719594415241),
Offset(21.478151321874066, 20.442964414424175),
Offset(24.455047704811673, 19.602102438466027),
Offset(26.189383160718236, 20.00035711055594),
Offset(27.237328880599087, 20.505669155240895),
Offset(27.942293084087247, 20.983659113323917),
Offset(28.423727804393636, 21.417767147703355),
Offset(28.74760457763108, 21.797113350311893),
Offset(28.96652407574663, 22.11428303003478),
Offset(29.114749020670935, 22.3705840866027),
Offset(29.2143313866939, 22.570942942339432),
Offset(29.279620406979603, 22.721160977307033),
Offset(29.319983847682064, 22.827011295959405),
Offset(29.34160856752674, 22.893734688263336),
Offset(29.349144235394235, 22.92587247976083),
],
<Offset>[
Offset(19.7425275, 35.0694285),
Offset(19.633231518178384, 35.02676980946995),
Offset(19.248834712358185, 34.86668062539688),
Offset(18.465078394956763, 34.48918310598561),
Offset(17.067862896878044, 33.62308654166575),
Offset(14.711614443143937, 31.375349080711565),
Offset(12.105677503717876, 24.620906478295183),
Offset(14.516075349646359, 16.52219347588495),
Offset(17.969922566948043, 13.101945406078135),
Offset(20.66764026066227, 11.422142117815724),
Offset(22.8010263074904, 10.49390235619516),
Offset(24.506449439583058, 10.01736474419652),
Offset(25.85522211418056, 9.824385871307193),
Offset(26.907111410786875, 9.782742715250919),
Offset(27.71521184544836, 9.815279001947939),
Offset(28.323121893643616, 9.87830571566402),
Offset(28.76520131167873, 9.947188181495804),
Offset(29.068463998826257, 10.008746091751288),
Offset(29.25404641776217, 10.05636169624624),
Offset(29.33922422040887, 10.085942311817597),
],
<Offset>[
Offset(19.7425275, 35.0694285),
Offset(19.633231518178384, 35.02676980946995),
Offset(19.248834712358185, 34.86668062539688),
Offset(18.465078394956763, 34.48918310598561),
Offset(17.067862896878044, 33.62308654166575),
Offset(14.711614443143937, 31.375349080711565),
Offset(12.105677503717876, 24.620906478295183),
Offset(14.516075349646359, 16.52219347588495),
Offset(17.969922566948043, 13.101945406078135),
Offset(20.66764026066227, 11.422142117815724),
Offset(22.8010263074904, 10.49390235619516),
Offset(24.506449439583058, 10.01736474419652),
Offset(25.85522211418056, 9.824385871307193),
Offset(26.907111410786875, 9.782742715250919),
Offset(27.71521184544836, 9.815279001947939),
Offset(28.323121893643616, 9.87830571566402),
Offset(28.76520131167873, 9.947188181495804),
Offset(29.068463998826257, 10.008746091751288),
Offset(29.25404641776217, 10.05636169624624),
Offset(29.33922422040887, 10.085942311817597),
],
),
_PathCubicTo(
<Offset>[
Offset(19.7425275, 35.0694285),
Offset(19.633231518178384, 35.02676980946995),
Offset(19.248834712358185, 34.86668062539688),
Offset(18.465078394956763, 34.48918310598561),
Offset(17.067862896878044, 33.62308654166575),
Offset(14.711614443143937, 31.375349080711565),
Offset(12.105677503717876, 24.620906478295183),
Offset(14.516075349646359, 16.52219347588495),
Offset(17.969922566948043, 13.101945406078135),
Offset(20.66764026066227, 11.422142117815724),
Offset(22.8010263074904, 10.49390235619516),
Offset(24.506449439583058, 10.01736474419652),
Offset(25.85522211418056, 9.824385871307193),
Offset(26.907111410786875, 9.782742715250919),
Offset(27.71521184544836, 9.815279001947939),
Offset(28.323121893643616, 9.87830571566402),
Offset(28.76520131167873, 9.947188181495804),
Offset(29.068463998826257, 10.008746091751288),
Offset(29.25404641776217, 10.05636169624624),
Offset(29.33922422040887, 10.085942311817597),
],
<Offset>[
Offset(28.2574725, 35.0694285),
Offset(28.147759865199898, 35.111003892785995),
Offset(27.755158143717388, 35.24976029613705),
Offset(26.920438621917032, 35.49475348411108),
Offset(25.302956224572092, 35.788156110338775),
Offset(22.04777247580016, 35.69866180419461),
Offset(15.58729589027705, 32.43130132675867),
Offset(11.949484547495462, 24.804670438522713),
Offset(12.221246146549875, 19.951495900886627),
Offset(13.098034396141294, 16.896882634429737),
Offset(14.059562343216436, 14.778291336692531),
Offset(15.006114103327363, 13.28176338153867),
Offset(15.877949215009977, 12.234704590849294),
Offset(16.63082781513366, 11.498919936050715),
Offset(17.252457608236057, 10.981559981300084),
Offset(17.74592420474744, 10.620980293205921),
Offset(18.12022398183604, 10.375870760913198),
Offset(18.386576328652826, 10.218345965797791),
Offset(18.556235591081254, 10.129330154383384),
Offset(18.63928241378951, 10.094208990972067),
],
<Offset>[
Offset(28.2574725, 35.0694285),
Offset(28.147759865199898, 35.111003892785995),
Offset(27.755158143717388, 35.24976029613705),
Offset(26.920438621917032, 35.49475348411108),
Offset(25.302956224572092, 35.788156110338775),
Offset(22.04777247580016, 35.69866180419461),
Offset(15.58729589027705, 32.43130132675867),
Offset(11.949484547495462, 24.804670438522713),
Offset(12.221246146549875, 19.951495900886627),
Offset(13.098034396141294, 16.896882634429737),
Offset(14.059562343216436, 14.778291336692531),
Offset(15.006114103327363, 13.28176338153867),
Offset(15.877949215009977, 12.234704590849294),
Offset(16.63082781513366, 11.498919936050715),
Offset(17.252457608236057, 10.981559981300084),
Offset(17.74592420474744, 10.620980293205921),
Offset(18.12022398183604, 10.375870760913198),
Offset(18.386576328652826, 10.218345965797791),
Offset(18.556235591081254, 10.129330154383384),
Offset(18.63928241378951, 10.094208990972067),
],
),
_PathCubicTo(
<Offset>[
Offset(28.2574725, 35.0694285),
Offset(28.147759865199898, 35.111003892785995),
Offset(27.755158143717388, 35.24976029613705),
Offset(26.920438621917032, 35.49475348411108),
Offset(25.302956224572092, 35.788156110338775),
Offset(22.04777247580016, 35.69866180419461),
Offset(15.58729589027705, 32.43130132675867),
Offset(11.949484547495462, 24.804670438522713),
Offset(12.221246146549875, 19.951495900886627),
Offset(13.098034396141294, 16.896882634429737),
Offset(14.059562343216436, 14.778291336692531),
Offset(15.006114103327363, 13.28176338153867),
Offset(15.877949215009977, 12.234704590849294),
Offset(16.63082781513366, 11.498919936050715),
Offset(17.252457608236057, 10.981559981300084),
Offset(17.74592420474744, 10.620980293205921),
Offset(18.12022398183604, 10.375870760913198),
Offset(18.386576328652826, 10.218345965797791),
Offset(18.556235591081254, 10.129330154383384),
Offset(18.63928241378951, 10.094208990972067),
],
<Offset>[
Offset(28.2574725, 24.8514945),
Offset(28.248840765179153, 24.893569876360175),
Offset(28.214853748605588, 25.042172178506007),
Offset(28.12712307566759, 25.34832121175876),
Offset(27.90103970697972, 25.90604411710592),
Offset(27.235747743979807, 26.895272165007142),
Offset(24.959769708433235, 28.253359262887663),
Offset(21.888456902660778, 27.88457940110379),
Offset(20.440706740320067, 26.84990760536443),
Offset(19.66772301607811, 25.980409671854908),
Offset(19.20082911981328, 25.26804809382129),
Offset(18.92339246813794, 24.682165785045505),
Offset(18.770331678460497, 24.207432069853994),
Offset(18.690240480093415, 23.830460250834577),
Offset(18.651994783458633, 23.536865065954846),
Offset(18.637133697797722, 23.313617519881333),
Offset(18.634643077136914, 23.149843556724427),
Offset(18.638096177508633, 23.03661117000591),
Offset(18.643797740845827, 22.966703146400476),
Offset(18.649202428774874, 22.9341391589153),
],
<Offset>[
Offset(28.2574725, 24.8514945),
Offset(28.248840765179153, 24.893569876360175),
Offset(28.214853748605588, 25.042172178506007),
Offset(28.12712307566759, 25.34832121175876),
Offset(27.90103970697972, 25.90604411710592),
Offset(27.235747743979807, 26.895272165007142),
Offset(24.959769708433235, 28.253359262887663),
Offset(21.888456902660778, 27.88457940110379),
Offset(20.440706740320067, 26.84990760536443),
Offset(19.66772301607811, 25.980409671854908),
Offset(19.20082911981328, 25.26804809382129),
Offset(18.92339246813794, 24.682165785045505),
Offset(18.770331678460497, 24.207432069853994),
Offset(18.690240480093415, 23.830460250834577),
Offset(18.651994783458633, 23.536865065954846),
Offset(18.637133697797722, 23.313617519881333),
Offset(18.634643077136914, 23.149843556724427),
Offset(18.638096177508633, 23.03661117000591),
Offset(18.643797740845827, 22.966703146400476),
Offset(18.649202428774874, 22.9341391589153),
],
),
_PathClose(
),
],
),
_PathFrames(
opacities: <double>[
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.146341463415,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
],
commands: <_PathCommand>[
_PathMoveTo(
<Offset>[
Offset(18.0395385, 24.851494500000005),
Offset(18.03140674875334, 24.79248897638092),
Offset(18.007265630974544, 24.58247657361781),
Offset(17.98069080331527, 24.141636758008197),
Offset(18.018927713746866, 23.30796063469829),
Offset(18.432358104792343, 21.707296896827494),
Offset(20.78182764456223, 18.880885444731472),
Offset(24.96836586524185, 17.945607045938473),
Offset(27.339118444797872, 18.63044701159424),
Offset(28.751250053503288, 19.41072105191809),
Offset(29.690585876942034, 20.12678131722444),
Offset(30.323794871644772, 20.764887420234924),
Offset(30.7430591574652, 21.315049606403473),
Offset(31.021780794877273, 21.771047585874822),
Offset(31.20729986811339, 22.13732789073227),
Offset(31.32977092447313, 22.42240802683105),
Offset(31.408615872948143, 22.635424461423554),
Offset(31.456361381716757, 22.785091321150105),
Offset(31.48117073286292, 22.87914099663591),
Offset(31.489132596718107, 22.924219143929935),
],
),
_PathCubicTo(
<Offset>[
Offset(18.0395385, 24.851494500000005),
Offset(18.03140674875334, 24.79248897638092),
Offset(18.007265630974544, 24.58247657361781),
Offset(17.98069080331527, 24.141636758008197),
Offset(18.018927713746866, 23.30796063469829),
Offset(18.432358104792343, 21.707296896827494),
Offset(20.78182764456223, 18.880885444731472),
Offset(24.96836586524185, 17.945607045938473),
Offset(27.339118444797872, 18.63044701159424),
Offset(28.751250053503288, 19.41072105191809),
Offset(29.690585876942034, 20.12678131722444),
Offset(30.323794871644772, 20.764887420234924),
Offset(30.7430591574652, 21.315049606403473),
Offset(31.021780794877273, 21.771047585874822),
Offset(31.20729986811339, 22.13732789073227),
Offset(31.32977092447313, 22.42240802683105),
Offset(31.408615872948143, 22.635424461423554),
Offset(31.456361381716757, 22.785091321150105),
Offset(31.48117073286292, 22.87914099663591),
Offset(31.489132596718107, 22.924219143929935),
],
<Offset>[
Offset(9.5245935, 24.851494500000005),
Offset(9.516878401731827, 24.708254893064876),
Offset(9.500942199615341, 24.199396902877645),
Offset(9.525330576355001, 23.136066379882735),
Offset(9.783834386052819, 21.142891066025268),
Offset(11.09620007213612, 17.383984173344455),
Offset(17.300209258003058, 11.070490596267984),
Offset(27.534956667392745, 9.663130083300711),
Offset(33.08779486519604, 11.780896516785745),
Offset(36.320855918024264, 13.935980535304076),
Offset(38.432049841216, 15.842392336727073),
Offset(39.82413020790047, 17.500488782892777),
Offset(40.72033205663578, 18.904730886861373),
Offset(41.298064390530485, 20.054870365075026),
Offset(41.67005410532569, 20.971046911380125),
Offset(41.90696861336931, 21.67973344928915),
Offset(42.053593202790836, 22.20674188200616),
Offset(42.138249051890185, 22.5754914471036),
Offset(42.178981559543836, 22.806172538498764),
Offset(42.189074403337465, 22.915952464775465),
],
<Offset>[
Offset(9.5245935, 24.851494500000005),
Offset(9.516878401731827, 24.708254893064876),
Offset(9.500942199615341, 24.199396902877645),
Offset(9.525330576355001, 23.136066379882735),
Offset(9.783834386052819, 21.142891066025268),
Offset(11.09620007213612, 17.383984173344455),
Offset(17.300209258003058, 11.070490596267984),
Offset(27.534956667392745, 9.663130083300711),
Offset(33.08779486519604, 11.780896516785745),
Offset(36.320855918024264, 13.935980535304076),
Offset(38.432049841216, 15.842392336727073),
Offset(39.82413020790047, 17.500488782892777),
Offset(40.72033205663578, 18.904730886861373),
Offset(41.298064390530485, 20.054870365075026),
Offset(41.67005410532569, 20.971046911380125),
Offset(41.90696861336931, 21.67973344928915),
Offset(42.053593202790836, 22.20674188200616),
Offset(42.138249051890185, 22.5754914471036),
Offset(42.178981559543836, 22.806172538498764),
Offset(42.189074403337465, 22.915952464775465),
],
),
_PathCubicTo(
<Offset>[
Offset(9.5245935, 24.851494500000005),
Offset(9.516878401731827, 24.708254893064876),
Offset(9.500942199615341, 24.199396902877645),
Offset(9.525330576355001, 23.136066379882735),
Offset(9.783834386052819, 21.142891066025268),
Offset(11.09620007213612, 17.383984173344455),
Offset(17.300209258003058, 11.070490596267984),
Offset(27.534956667392745, 9.663130083300711),
Offset(33.08779486519604, 11.780896516785745),
Offset(36.320855918024264, 13.935980535304076),
Offset(38.432049841216, 15.842392336727073),
Offset(39.82413020790047, 17.500488782892777),
Offset(40.72033205663578, 18.904730886861373),
Offset(41.298064390530485, 20.054870365075026),
Offset(41.67005410532569, 20.971046911380125),
Offset(41.90696861336931, 21.67973344928915),
Offset(42.053593202790836, 22.20674188200616),
Offset(42.138249051890185, 22.5754914471036),
Offset(42.178981559543836, 22.806172538498764),
Offset(42.189074403337465, 22.915952464775465),
],
<Offset>[
Offset(9.524593500000002, 35.06942850000001),
Offset(9.415797501752571, 34.92568890949069),
Offset(9.041246594727141, 34.406985020508685),
Offset(8.318646122604441, 33.282498652235056),
Offset(7.185750903645189, 31.025003059258125),
Offset(5.908224803956472, 26.187373812531924),
Offset(7.92773543984687, 15.24843266013899),
Offset(17.59598431222743, 6.583221120719635),
Offset(24.868334271425848, 4.882484812307943),
Offset(29.75116729808745, 4.852453497878906),
Offset(33.290783064619156, 5.352635579598315),
Offset(35.90685184308989, 6.1000863793859414),
Offset(37.82794959318526, 6.932003407856674),
Offset(39.23865172557073, 7.723330050291165),
Offset(40.27051693010311, 8.415741826725363),
Offset(41.015759120319025, 8.987096222613737),
Offset(41.53917410748996, 9.43276908619493),
Offset(41.886729203034385, 9.757226242895484),
Offset(42.09141940977926, 9.968799546481671),
Offset(42.1791543883521, 10.076022296832232),
],
<Offset>[
Offset(9.524593500000002, 35.06942850000001),
Offset(9.415797501752571, 34.92568890949069),
Offset(9.041246594727141, 34.406985020508685),
Offset(8.318646122604441, 33.282498652235056),
Offset(7.185750903645189, 31.025003059258125),
Offset(5.908224803956472, 26.187373812531924),
Offset(7.92773543984687, 15.24843266013899),
Offset(17.59598431222743, 6.583221120719635),
Offset(24.868334271425848, 4.882484812307943),
Offset(29.75116729808745, 4.852453497878906),
Offset(33.290783064619156, 5.352635579598315),
Offset(35.90685184308989, 6.1000863793859414),
Offset(37.82794959318526, 6.932003407856674),
Offset(39.23865172557073, 7.723330050291165),
Offset(40.27051693010311, 8.415741826725363),
Offset(41.015759120319025, 8.987096222613737),
Offset(41.53917410748996, 9.43276908619493),
Offset(41.886729203034385, 9.757226242895484),
Offset(42.09141940977926, 9.968799546481671),
Offset(42.1791543883521, 10.076022296832232),
],
),
_PathCubicTo(
<Offset>[
Offset(9.524593500000002, 35.06942850000001),
Offset(9.415797501752571, 34.92568890949069),
Offset(9.041246594727141, 34.406985020508685),
Offset(8.318646122604441, 33.282498652235056),
Offset(7.185750903645189, 31.025003059258125),
Offset(5.908224803956472, 26.187373812531924),
Offset(7.92773543984687, 15.24843266013899),
Offset(17.59598431222743, 6.583221120719635),
Offset(24.868334271425848, 4.882484812307943),
Offset(29.75116729808745, 4.852453497878906),
Offset(33.290783064619156, 5.352635579598315),
Offset(35.90685184308989, 6.1000863793859414),
Offset(37.82794959318526, 6.932003407856674),
Offset(39.23865172557073, 7.723330050291165),
Offset(40.27051693010311, 8.415741826725363),
Offset(41.015759120319025, 8.987096222613737),
Offset(41.53917410748996, 9.43276908619493),
Offset(41.886729203034385, 9.757226242895484),
Offset(42.09141940977926, 9.968799546481671),
Offset(42.1791543883521, 10.076022296832232),
],
<Offset>[
Offset(18.0395385, 35.0694285),
Offset(17.930325848774086, 35.009922992806736),
Offset(17.547570026086344, 34.79006469124885),
Offset(16.77400634956471, 34.28806903036052),
Offset(15.420844231339236, 33.190072627931144),
Offset(13.244382836612694, 30.510686536014962),
Offset(11.409353826406043, 23.05882750860248),
Offset(15.029393510076535, 14.865698083357398),
Offset(19.119657851027682, 11.732035307116437),
Offset(22.181561433566472, 10.327194014492921),
Offset(24.549319100345187, 9.637024560095686),
Offset(26.406516506834194, 9.36448501672809),
Offset(27.85067669401468, 9.342322127398774),
Offset(28.962368129917518, 9.43950727109096),
Offset(29.807762692890815, 9.582022806077507),
Offset(30.438561431422848, 9.729770800155638),
Offset(30.89419677764727, 9.861451665612325),
Offset(31.20484153286095, 9.966826116941988),
Offset(31.39360858309835, 10.041768004618815),
Offset(31.479212581732742, 10.084288975986702),
],
<Offset>[
Offset(18.0395385, 35.0694285),
Offset(17.930325848774086, 35.009922992806736),
Offset(17.547570026086344, 34.79006469124885),
Offset(16.77400634956471, 34.28806903036052),
Offset(15.420844231339236, 33.190072627931144),
Offset(13.244382836612694, 30.510686536014962),
Offset(11.409353826406043, 23.05882750860248),
Offset(15.029393510076535, 14.865698083357398),
Offset(19.119657851027682, 11.732035307116437),
Offset(22.181561433566472, 10.327194014492921),
Offset(24.549319100345187, 9.637024560095686),
Offset(26.406516506834194, 9.36448501672809),
Offset(27.85067669401468, 9.342322127398774),
Offset(28.962368129917518, 9.43950727109096),
Offset(29.807762692890815, 9.582022806077507),
Offset(30.438561431422848, 9.729770800155638),
Offset(30.89419677764727, 9.861451665612325),
Offset(31.20484153286095, 9.966826116941988),
Offset(31.39360858309835, 10.041768004618815),
Offset(31.479212581732742, 10.084288975986702),
],
),
_PathCubicTo(
<Offset>[
Offset(18.0395385, 35.0694285),
Offset(17.930325848774086, 35.009922992806736),
Offset(17.547570026086344, 34.79006469124885),
Offset(16.77400634956471, 34.28806903036052),
Offset(15.420844231339236, 33.190072627931144),
Offset(13.244382836612694, 30.510686536014962),
Offset(11.409353826406043, 23.05882750860248),
Offset(15.029393510076535, 14.865698083357398),
Offset(19.119657851027682, 11.732035307116437),
Offset(22.181561433566472, 10.327194014492921),
Offset(24.549319100345187, 9.637024560095686),
Offset(26.406516506834194, 9.36448501672809),
Offset(27.85067669401468, 9.342322127398774),
Offset(28.962368129917518, 9.43950727109096),
Offset(29.807762692890815, 9.582022806077507),
Offset(30.438561431422848, 9.729770800155638),
Offset(30.89419677764727, 9.861451665612325),
Offset(31.20484153286095, 9.966826116941988),
Offset(31.39360858309835, 10.041768004618815),
Offset(31.479212581732742, 10.084288975986702),
],
<Offset>[
Offset(18.0395385, 24.851494500000005),
Offset(18.03140674875334, 24.79248897638092),
Offset(18.007265630974544, 24.58247657361781),
Offset(17.98069080331527, 24.141636758008197),
Offset(18.018927713746866, 23.30796063469829),
Offset(18.432358104792343, 21.707296896827494),
Offset(20.78182764456223, 18.880885444731472),
Offset(24.96836586524185, 17.945607045938473),
Offset(27.339118444797872, 18.63044701159424),
Offset(28.751250053503288, 19.41072105191809),
Offset(29.690585876942034, 20.12678131722444),
Offset(30.323794871644772, 20.764887420234924),
Offset(30.7430591574652, 21.315049606403473),
Offset(31.021780794877273, 21.771047585874822),
Offset(31.20729986811339, 22.13732789073227),
Offset(31.32977092447313, 22.42240802683105),
Offset(31.408615872948143, 22.635424461423554),
Offset(31.456361381716757, 22.785091321150105),
Offset(31.48117073286292, 22.87914099663591),
Offset(31.489132596718107, 22.924219143929935),
],
<Offset>[
Offset(18.0395385, 24.851494500000005),
Offset(18.03140674875334, 24.79248897638092),
Offset(18.007265630974544, 24.58247657361781),
Offset(17.98069080331527, 24.141636758008197),
Offset(18.018927713746866, 23.30796063469829),
Offset(18.432358104792343, 21.707296896827494),
Offset(20.78182764456223, 18.880885444731472),
Offset(24.96836586524185, 17.945607045938473),
Offset(27.339118444797872, 18.63044701159424),
Offset(28.751250053503288, 19.41072105191809),
Offset(29.690585876942034, 20.12678131722444),
Offset(30.323794871644772, 20.764887420234924),
Offset(30.7430591574652, 21.315049606403473),
Offset(31.021780794877273, 21.771047585874822),
Offset(31.20729986811339, 22.13732789073227),
Offset(31.32977092447313, 22.42240802683105),
Offset(31.408615872948143, 22.635424461423554),
Offset(31.456361381716757, 22.785091321150105),
Offset(31.48117073286292, 22.87914099663591),
Offset(31.489132596718107, 22.924219143929935),
],
),
_PathClose(
),
],
),
_PathFrames(
opacities: <double>[
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.146341463415,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
],
commands: <_PathCommand>[
_PathMoveTo(
<Offset>[
Offset(38.4754065, 12.930571500000003),
Offset(38.58420249824743, 13.074311090509312),
Offset(38.958753405272866, 13.593014979491326),
Offset(39.681353877395566, 14.717501347764943),
Offset(40.81424909635481, 16.97499694074188),
Offset(42.09177519604353, 21.812626187468076),
Offset(40.07226456015313, 32.75156733986101),
Offset(30.404015687772564, 41.41677887928036),
Offset(23.131665728574156, 43.11751518769206),
Offset(18.248832701912562, 43.147546502121095),
Offset(14.709216935380839, 42.647364420401686),
Offset(12.093148156910111, 41.89991362061406),
Offset(10.17205040681474, 41.06799659214333),
Offset(8.761348274429261, 40.276669949708825),
Offset(7.729483069896876, 39.58425817327465),
Offset(6.984240879680973, 39.012903777386256),
Offset(6.460825892510038, 38.56723091380506),
Offset(6.1132707969656215, 38.242773757104516),
Offset(5.908580590220735, 38.03120045351832),
Offset(5.820845611647898, 37.923977703167765),
],
),
_PathCubicTo(
<Offset>[
Offset(38.4754065, 12.930571500000003),
Offset(38.58420249824743, 13.074311090509312),
Offset(38.958753405272866, 13.593014979491326),
Offset(39.681353877395566, 14.717501347764943),
Offset(40.81424909635481, 16.97499694074188),
Offset(42.09177519604353, 21.812626187468076),
Offset(40.07226456015313, 32.75156733986101),
Offset(30.404015687772564, 41.41677887928036),
Offset(23.131665728574156, 43.11751518769206),
Offset(18.248832701912562, 43.147546502121095),
Offset(14.709216935380839, 42.647364420401686),
Offset(12.093148156910111, 41.89991362061406),
Offset(10.17205040681474, 41.06799659214333),
Offset(8.761348274429261, 40.276669949708825),
Offset(7.729483069896876, 39.58425817327465),
Offset(6.984240879680973, 39.012903777386256),
Offset(6.460825892510038, 38.56723091380506),
Offset(6.1132707969656215, 38.242773757104516),
Offset(5.908580590220735, 38.03120045351832),
Offset(5.820845611647898, 37.923977703167765),
],
<Offset>[
Offset(29.9604615, 12.930571500000003),
Offset(30.069674151225918, 12.990077007193268),
Offset(30.452429973913663, 13.20993530875116),
Offset(31.225993650435292, 13.711930969639477),
Offset(32.57915576866076, 14.80992737206886),
Offset(34.755617163387306, 17.489313463985035),
Offset(36.59064617359396, 24.94117249139752),
Offset(32.970606489923455, 33.1343019166426),
Offset(28.880342148972325, 36.26796469288357),
Offset(25.81843856643354, 37.672805985507075),
Offset(23.450680899654806, 38.36297543990432),
Offset(21.593483493165806, 38.63551498327191),
Offset(20.149323305985323, 38.657677872601234),
Offset(19.03763187008248, 38.56049272890903),
Offset(18.192237307109178, 38.417977193922496),
Offset(17.56143856857715, 38.27022919984435),
Offset(17.10580322235273, 38.13854833438767),
Offset(16.795158467139053, 38.03317388305801),
Offset(16.606391416901644, 37.95823199538118),
Offset(16.520787418267258, 37.9157110240133),
],
<Offset>[
Offset(29.9604615, 12.930571500000003),
Offset(30.069674151225918, 12.990077007193268),
Offset(30.452429973913663, 13.20993530875116),
Offset(31.225993650435292, 13.711930969639477),
Offset(32.57915576866076, 14.80992737206886),
Offset(34.755617163387306, 17.489313463985035),
Offset(36.59064617359396, 24.94117249139752),
Offset(32.970606489923455, 33.1343019166426),
Offset(28.880342148972325, 36.26796469288357),
Offset(25.81843856643354, 37.672805985507075),
Offset(23.450680899654806, 38.36297543990432),
Offset(21.593483493165806, 38.63551498327191),
Offset(20.149323305985323, 38.657677872601234),
Offset(19.03763187008248, 38.56049272890903),
Offset(18.192237307109178, 38.417977193922496),
Offset(17.56143856857715, 38.27022919984435),
Offset(17.10580322235273, 38.13854833438767),
Offset(16.795158467139053, 38.03317388305801),
Offset(16.606391416901644, 37.95823199538118),
Offset(16.520787418267258, 37.9157110240133),
],
),
_PathCubicTo(
<Offset>[
Offset(29.9604615, 12.930571500000003),
Offset(30.069674151225918, 12.990077007193268),
Offset(30.452429973913663, 13.20993530875116),
Offset(31.225993650435292, 13.711930969639477),
Offset(32.57915576866076, 14.80992737206886),
Offset(34.755617163387306, 17.489313463985035),
Offset(36.59064617359396, 24.94117249139752),
Offset(32.970606489923455, 33.1343019166426),
Offset(28.880342148972325, 36.26796469288357),
Offset(25.81843856643354, 37.672805985507075),
Offset(23.450680899654806, 38.36297543990432),
Offset(21.593483493165806, 38.63551498327191),
Offset(20.149323305985323, 38.657677872601234),
Offset(19.03763187008248, 38.56049272890903),
Offset(18.192237307109178, 38.417977193922496),
Offset(17.56143856857715, 38.27022919984435),
Offset(17.10580322235273, 38.13854833438767),
Offset(16.795158467139053, 38.03317388305801),
Offset(16.606391416901644, 37.95823199538118),
Offset(16.520787418267258, 37.9157110240133),
],
<Offset>[
Offset(29.9604615, 23.148505500000002),
Offset(29.968593251246663, 23.207511023619084),
Offset(29.992734369025463, 23.4175234263822),
Offset(30.019309196684734, 23.858363241991796),
Offset(29.98107228625313, 24.692039365301717),
Offset(29.567641895207657, 26.2927031031725),
Offset(27.218172355437773, 29.119114555268528),
Offset(23.031634134758143, 30.054392954061523),
Offset(20.66088155520213, 29.369552988405765),
Offset(19.248749946496723, 28.58927894808191),
Offset(18.30941412305796, 27.87321868277556),
Offset(17.676205128355228, 27.235112579765072),
Offset(17.256940842534803, 26.684950393596534),
Offset(16.978219205122727, 26.228952414125168),
Offset(16.7927001318866, 25.862672109267738),
Offset(16.67022907552687, 25.57759197316894),
Offset(16.591384127051857, 25.364575538576442),
Offset(16.543638618283246, 25.21490867884989),
Offset(16.518829267137072, 25.12085900336409),
Offset(16.510867403281896, 25.075780856070065),
],
<Offset>[
Offset(29.9604615, 23.148505500000002),
Offset(29.968593251246663, 23.207511023619084),
Offset(29.992734369025463, 23.4175234263822),
Offset(30.019309196684734, 23.858363241991796),
Offset(29.98107228625313, 24.692039365301717),
Offset(29.567641895207657, 26.2927031031725),
Offset(27.218172355437773, 29.119114555268528),
Offset(23.031634134758143, 30.054392954061523),
Offset(20.66088155520213, 29.369552988405765),
Offset(19.248749946496723, 28.58927894808191),
Offset(18.30941412305796, 27.87321868277556),
Offset(17.676205128355228, 27.235112579765072),
Offset(17.256940842534803, 26.684950393596534),
Offset(16.978219205122727, 26.228952414125168),
Offset(16.7927001318866, 25.862672109267738),
Offset(16.67022907552687, 25.57759197316894),
Offset(16.591384127051857, 25.364575538576442),
Offset(16.543638618283246, 25.21490867884989),
Offset(16.518829267137072, 25.12085900336409),
Offset(16.510867403281896, 25.075780856070065),
],
),
_PathCubicTo(
<Offset>[
Offset(29.9604615, 23.148505500000002),
Offset(29.968593251246663, 23.207511023619084),
Offset(29.992734369025463, 23.4175234263822),
Offset(30.019309196684734, 23.858363241991796),
Offset(29.98107228625313, 24.692039365301717),
Offset(29.567641895207657, 26.2927031031725),
Offset(27.218172355437773, 29.119114555268528),
Offset(23.031634134758143, 30.054392954061523),
Offset(20.66088155520213, 29.369552988405765),
Offset(19.248749946496723, 28.58927894808191),
Offset(18.30941412305796, 27.87321868277556),
Offset(17.676205128355228, 27.235112579765072),
Offset(17.256940842534803, 26.684950393596534),
Offset(16.978219205122727, 26.228952414125168),
Offset(16.7927001318866, 25.862672109267738),
Offset(16.67022907552687, 25.57759197316894),
Offset(16.591384127051857, 25.364575538576442),
Offset(16.543638618283246, 25.21490867884989),
Offset(16.518829267137072, 25.12085900336409),
Offset(16.510867403281896, 25.075780856070065),
],
<Offset>[
Offset(38.4754065, 23.148505500000002),
Offset(38.48312159826818, 23.291745106935128),
Offset(38.49905780038466, 23.800603097122366),
Offset(38.474669423645004, 24.863933620117265),
Offset(38.216165613947176, 26.85710893397474),
Offset(36.90379992786388, 30.61601582665554),
Offset(30.699790741996942, 36.92950940373201),
Offset(20.465043332607248, 38.336869916699285),
Offset(14.912205134803964, 36.219103483214255),
Offset(11.679144081975746, 34.064019464695924),
Offset(9.567950158783995, 32.15760766327293),
Offset(8.175869792099533, 30.499511217107223),
Offset(7.2796679433642195, 29.095269113138635),
Offset(6.701935609469508, 27.945129634924964),
Offset(6.3299458946742995, 27.028953088619883),
Offset(6.093031386630692, 26.32026655071084),
Offset(5.946406797209165, 25.793258117993837),
Offset(5.861750948109816, 25.424508552896395),
Offset(5.821018440456163, 25.19382746150123),
Offset(5.810925596662535, 25.084047535224535),
],
<Offset>[
Offset(38.4754065, 23.148505500000002),
Offset(38.48312159826818, 23.291745106935128),
Offset(38.49905780038466, 23.800603097122366),
Offset(38.474669423645004, 24.863933620117265),
Offset(38.216165613947176, 26.85710893397474),
Offset(36.90379992786388, 30.61601582665554),
Offset(30.699790741996942, 36.92950940373201),
Offset(20.465043332607248, 38.336869916699285),
Offset(14.912205134803964, 36.219103483214255),
Offset(11.679144081975746, 34.064019464695924),
Offset(9.567950158783995, 32.15760766327293),
Offset(8.175869792099533, 30.499511217107223),
Offset(7.2796679433642195, 29.095269113138635),
Offset(6.701935609469508, 27.945129634924964),
Offset(6.3299458946742995, 27.028953088619883),
Offset(6.093031386630692, 26.32026655071084),
Offset(5.946406797209165, 25.793258117993837),
Offset(5.861750948109816, 25.424508552896395),
Offset(5.821018440456163, 25.19382746150123),
Offset(5.810925596662535, 25.084047535224535),
],
),
_PathCubicTo(
<Offset>[
Offset(38.4754065, 23.148505500000002),
Offset(38.48312159826818, 23.291745106935128),
Offset(38.49905780038466, 23.800603097122366),
Offset(38.474669423645004, 24.863933620117265),
Offset(38.216165613947176, 26.85710893397474),
Offset(36.90379992786388, 30.61601582665554),
Offset(30.699790741996942, 36.92950940373201),
Offset(20.465043332607248, 38.336869916699285),
Offset(14.912205134803964, 36.219103483214255),
Offset(11.679144081975746, 34.064019464695924),
Offset(9.567950158783995, 32.15760766327293),
Offset(8.175869792099533, 30.499511217107223),
Offset(7.2796679433642195, 29.095269113138635),
Offset(6.701935609469508, 27.945129634924964),
Offset(6.3299458946742995, 27.028953088619883),
Offset(6.093031386630692, 26.32026655071084),
Offset(5.946406797209165, 25.793258117993837),
Offset(5.861750948109816, 25.424508552896395),
Offset(5.821018440456163, 25.19382746150123),
Offset(5.810925596662535, 25.084047535224535),
],
<Offset>[
Offset(38.4754065, 12.930571500000003),
Offset(38.58420249824743, 13.074311090509312),
Offset(38.958753405272866, 13.593014979491326),
Offset(39.681353877395566, 14.717501347764943),
Offset(40.81424909635481, 16.97499694074188),
Offset(42.09177519604353, 21.812626187468076),
Offset(40.07226456015313, 32.75156733986101),
Offset(30.404015687772564, 41.41677887928036),
Offset(23.131665728574156, 43.11751518769206),
Offset(18.248832701912562, 43.147546502121095),
Offset(14.709216935380839, 42.647364420401686),
Offset(12.093148156910111, 41.89991362061406),
Offset(10.17205040681474, 41.06799659214333),
Offset(8.761348274429261, 40.276669949708825),
Offset(7.729483069896876, 39.58425817327465),
Offset(6.984240879680973, 39.012903777386256),
Offset(6.460825892510038, 38.56723091380506),
Offset(6.1132707969656215, 38.242773757104516),
Offset(5.908580590220735, 38.03120045351832),
Offset(5.820845611647898, 37.923977703167765),
],
<Offset>[
Offset(38.4754065, 12.930571500000003),
Offset(38.58420249824743, 13.074311090509312),
Offset(38.958753405272866, 13.593014979491326),
Offset(39.681353877395566, 14.717501347764943),
Offset(40.81424909635481, 16.97499694074188),
Offset(42.09177519604353, 21.812626187468076),
Offset(40.07226456015313, 32.75156733986101),
Offset(30.404015687772564, 41.41677887928036),
Offset(23.131665728574156, 43.11751518769206),
Offset(18.248832701912562, 43.147546502121095),
Offset(14.709216935380839, 42.647364420401686),
Offset(12.093148156910111, 41.89991362061406),
Offset(10.17205040681474, 41.06799659214333),
Offset(8.761348274429261, 40.276669949708825),
Offset(7.729483069896876, 39.58425817327465),
Offset(6.984240879680973, 39.012903777386256),
Offset(6.460825892510038, 38.56723091380506),
Offset(6.1132707969656215, 38.242773757104516),
Offset(5.908580590220735, 38.03120045351832),
Offset(5.820845611647898, 37.923977703167765),
],
),
_PathClose(
),
],
),
_PathFrames(
opacities: <double>[
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.146341463415,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
],
commands: <_PathCommand>[
_PathMoveTo(
<Offset>[
Offset(28.257472499999995, 12.930571500000006),
Offset(28.366768481821616, 12.973230190530057),
Offset(28.75116528764182, 13.133319374603126),
Offset(29.53492160504324, 13.510816894014384),
Offset(30.932137103121953, 14.376913458334252),
Offset(33.28838555685606, 16.624650919288428),
Offset(35.89432249628212, 23.37909352170482),
Offset(33.48392465035364, 31.477806524115046),
Offset(30.030077433051954, 34.89805459392186),
Offset(27.33235973933773, 36.577857882184276),
Offset(25.1989736925096, 37.50609764380484),
Offset(23.49355056041695, 37.98263525580348),
Offset(22.14477788581944, 38.17561412869281),
Offset(21.092888589213125, 38.217257284749074),
Offset(20.284788154551638, 38.18472099805207),
Offset(19.676878106356384, 38.12169428433597),
Offset(19.234798688321266, 38.052811818504196),
Offset(18.93153600117374, 37.99125390824871),
Offset(18.74595358223783, 37.94363830375375),
Offset(18.66077577959113, 37.914057688182396),
],
),
_PathCubicTo(
<Offset>[
Offset(28.257472499999995, 12.930571500000006),
Offset(28.366768481821616, 12.973230190530057),
Offset(28.75116528764182, 13.133319374603126),
Offset(29.53492160504324, 13.510816894014384),
Offset(30.932137103121953, 14.376913458334252),
Offset(33.28838555685606, 16.624650919288428),
Offset(35.89432249628212, 23.37909352170482),
Offset(33.48392465035364, 31.477806524115046),
Offset(30.030077433051954, 34.89805459392186),
Offset(27.33235973933773, 36.577857882184276),
Offset(25.1989736925096, 37.50609764380484),
Offset(23.49355056041695, 37.98263525580348),
Offset(22.14477788581944, 38.17561412869281),
Offset(21.092888589213125, 38.217257284749074),
Offset(20.284788154551638, 38.18472099805207),
Offset(19.676878106356384, 38.12169428433597),
Offset(19.234798688321266, 38.052811818504196),
Offset(18.93153600117374, 37.99125390824871),
Offset(18.74595358223783, 37.94363830375375),
Offset(18.66077577959113, 37.914057688182396),
],
<Offset>[
Offset(19.742527499999994, 12.930571500000006),
Offset(19.852240134800102, 12.888996107214012),
Offset(20.244841856282616, 12.75023970386296),
Offset(21.07956137808297, 12.505246515888919),
Offset(22.697043775427904, 12.211843889661228),
Offset(25.95222752419984, 12.30133819580539),
Offset(32.41270410972295, 15.568698673241332),
Offset(36.05051545250454, 23.195329561477283),
Offset(35.77875385345012, 28.048504099113373),
Offset(34.901965603858706, 31.10311736557026),
Offset(33.940437656783566, 33.221708663307474),
Offset(32.993885896672644, 34.71823661846133),
Offset(32.12205078499002, 35.7652954091507),
Offset(31.369172184866343, 36.50108006394928),
Offset(30.74754239176394, 37.01844001869992),
Offset(30.25407579525256, 37.379019706794075),
Offset(29.879776018163955, 37.6241292390868),
Offset(29.61342367134717, 37.781654034202205),
Offset(29.44376440891874, 37.87066984561661),
Offset(29.36071758621049, 37.90579100902793),
],
<Offset>[
Offset(19.742527499999994, 12.930571500000006),
Offset(19.852240134800102, 12.888996107214012),
Offset(20.244841856282616, 12.75023970386296),
Offset(21.07956137808297, 12.505246515888919),
Offset(22.697043775427904, 12.211843889661228),
Offset(25.95222752419984, 12.30133819580539),
Offset(32.41270410972295, 15.568698673241332),
Offset(36.05051545250454, 23.195329561477283),
Offset(35.77875385345012, 28.048504099113373),
Offset(34.901965603858706, 31.10311736557026),
Offset(33.940437656783566, 33.221708663307474),
Offset(32.993885896672644, 34.71823661846133),
Offset(32.12205078499002, 35.7652954091507),
Offset(31.369172184866343, 36.50108006394928),
Offset(30.74754239176394, 37.01844001869992),
Offset(30.25407579525256, 37.379019706794075),
Offset(29.879776018163955, 37.6241292390868),
Offset(29.61342367134717, 37.781654034202205),
Offset(29.44376440891874, 37.87066984561661),
Offset(29.36071758621049, 37.90579100902793),
],
),
_PathCubicTo(
<Offset>[
Offset(19.742527499999994, 12.930571500000006),
Offset(19.852240134800102, 12.888996107214012),
Offset(20.244841856282616, 12.75023970386296),
Offset(21.07956137808297, 12.505246515888919),
Offset(22.697043775427904, 12.211843889661228),
Offset(25.95222752419984, 12.30133819580539),
Offset(32.41270410972295, 15.568698673241332),
Offset(36.05051545250454, 23.195329561477283),
Offset(35.77875385345012, 28.048504099113373),
Offset(34.901965603858706, 31.10311736557026),
Offset(33.940437656783566, 33.221708663307474),
Offset(32.993885896672644, 34.71823661846133),
Offset(32.12205078499002, 35.7652954091507),
Offset(31.369172184866343, 36.50108006394928),
Offset(30.74754239176394, 37.01844001869992),
Offset(30.25407579525256, 37.379019706794075),
Offset(29.879776018163955, 37.6241292390868),
Offset(29.61342367134717, 37.781654034202205),
Offset(29.44376440891874, 37.87066984561661),
Offset(29.36071758621049, 37.90579100902793),
],
<Offset>[
Offset(19.742527499999998, 23.148505500000006),
Offset(19.751159234820847, 23.10643012363983),
Offset(19.785146251394416, 22.957827821494),
Offset(19.872876924332413, 22.65167878824124),
Offset(20.098960293020276, 22.093955882894086),
Offset(20.764252256020193, 21.104727834992858),
Offset(23.040230291566765, 19.74664073711234),
Offset(26.111543097339222, 20.115420598896208),
Offset(27.55929325967993, 21.15009239463557),
Offset(28.33227698392189, 22.01959032814509),
Offset(28.79917088018672, 22.731951906178715),
Offset(29.076607531862066, 23.317834214954495),
Offset(29.229668321539503, 23.792567930146006),
Offset(29.309759519906592, 24.16953974916542),
Offset(29.348005216541363, 24.46313493404516),
Offset(29.362866302202278, 24.686382480118663),
Offset(29.365356922863082, 24.85015644327557),
Offset(29.361903822491364, 24.96338882999409),
Offset(29.356202259154166, 25.033296853599516),
Offset(29.350797571225126, 25.065860841084696),
],
<Offset>[
Offset(19.742527499999998, 23.148505500000006),
Offset(19.751159234820847, 23.10643012363983),
Offset(19.785146251394416, 22.957827821494),
Offset(19.872876924332413, 22.65167878824124),
Offset(20.098960293020276, 22.093955882894086),
Offset(20.764252256020193, 21.104727834992858),
Offset(23.040230291566765, 19.74664073711234),
Offset(26.111543097339222, 20.115420598896208),
Offset(27.55929325967993, 21.15009239463557),
Offset(28.33227698392189, 22.01959032814509),
Offset(28.79917088018672, 22.731951906178715),
Offset(29.076607531862066, 23.317834214954495),
Offset(29.229668321539503, 23.792567930146006),
Offset(29.309759519906592, 24.16953974916542),
Offset(29.348005216541363, 24.46313493404516),
Offset(29.362866302202278, 24.686382480118663),
Offset(29.365356922863082, 24.85015644327557),
Offset(29.361903822491364, 24.96338882999409),
Offset(29.356202259154166, 25.033296853599516),
Offset(29.350797571225126, 25.065860841084696),
],
),
_PathCubicTo(
<Offset>[
Offset(19.742527499999998, 23.148505500000006),
Offset(19.751159234820847, 23.10643012363983),
Offset(19.785146251394416, 22.957827821494),
Offset(19.872876924332413, 22.65167878824124),
Offset(20.098960293020276, 22.093955882894086),
Offset(20.764252256020193, 21.104727834992858),
Offset(23.040230291566765, 19.74664073711234),
Offset(26.111543097339222, 20.115420598896208),
Offset(27.55929325967993, 21.15009239463557),
Offset(28.33227698392189, 22.01959032814509),
Offset(28.79917088018672, 22.731951906178715),
Offset(29.076607531862066, 23.317834214954495),
Offset(29.229668321539503, 23.792567930146006),
Offset(29.309759519906592, 24.16953974916542),
Offset(29.348005216541363, 24.46313493404516),
Offset(29.362866302202278, 24.686382480118663),
Offset(29.365356922863082, 24.85015644327557),
Offset(29.361903822491364, 24.96338882999409),
Offset(29.356202259154166, 25.033296853599516),
Offset(29.350797571225126, 25.065860841084696),
],
<Offset>[
Offset(28.2574725, 23.148505500000006),
Offset(28.26568758184236, 23.190664206955873),
Offset(28.29146968275362, 23.340907492234166),
Offset(28.328237151292683, 23.657249166366704),
Offset(28.334053620714325, 24.25902545156711),
Offset(28.100410288676414, 25.428040558475896),
Offset(26.521848678125934, 27.55703558557583),
Offset(23.544952295188327, 28.39789756153397),
Offset(21.810616839281764, 27.99964288944406),
Offset(20.762671119400913, 27.4943308447591),
Offset(20.057706915912753, 27.016340886676083),
Offset(19.57627219560637, 26.582232852296645),
Offset(19.25239542236892, 26.202886649688107),
Offset(19.033475924253374, 25.885716969965216),
Offset(18.88525097932906, 25.629415913397306),
Offset(18.7856686133061, 25.429057057660565),
Offset(18.720379593020393, 25.278839022692964),
Offset(18.680016152317933, 25.172988704040595),
Offset(18.65839143247326, 25.106265311736657),
Offset(18.650855764605765, 25.074127520239166),
],
<Offset>[
Offset(28.2574725, 23.148505500000006),
Offset(28.26568758184236, 23.190664206955873),
Offset(28.29146968275362, 23.340907492234166),
Offset(28.328237151292683, 23.657249166366704),
Offset(28.334053620714325, 24.25902545156711),
Offset(28.100410288676414, 25.428040558475896),
Offset(26.521848678125934, 27.55703558557583),
Offset(23.544952295188327, 28.39789756153397),
Offset(21.810616839281764, 27.99964288944406),
Offset(20.762671119400913, 27.4943308447591),
Offset(20.057706915912753, 27.016340886676083),
Offset(19.57627219560637, 26.582232852296645),
Offset(19.25239542236892, 26.202886649688107),
Offset(19.033475924253374, 25.885716969965216),
Offset(18.88525097932906, 25.629415913397306),
Offset(18.7856686133061, 25.429057057660565),
Offset(18.720379593020393, 25.278839022692964),
Offset(18.680016152317933, 25.172988704040595),
Offset(18.65839143247326, 25.106265311736657),
Offset(18.650855764605765, 25.074127520239166),
],
),
_PathCubicTo(
<Offset>[
Offset(28.2574725, 23.148505500000006),
Offset(28.26568758184236, 23.190664206955873),
Offset(28.29146968275362, 23.340907492234166),
Offset(28.328237151292683, 23.657249166366704),
Offset(28.334053620714325, 24.25902545156711),
Offset(28.100410288676414, 25.428040558475896),
Offset(26.521848678125934, 27.55703558557583),
Offset(23.544952295188327, 28.39789756153397),
Offset(21.810616839281764, 27.99964288944406),
Offset(20.762671119400913, 27.4943308447591),
Offset(20.057706915912753, 27.016340886676083),
Offset(19.57627219560637, 26.582232852296645),
Offset(19.25239542236892, 26.202886649688107),
Offset(19.033475924253374, 25.885716969965216),
Offset(18.88525097932906, 25.629415913397306),
Offset(18.7856686133061, 25.429057057660565),
Offset(18.720379593020393, 25.278839022692964),
Offset(18.680016152317933, 25.172988704040595),
Offset(18.65839143247326, 25.106265311736657),
Offset(18.650855764605765, 25.074127520239166),
],
<Offset>[
Offset(28.257472499999995, 12.930571500000006),
Offset(28.366768481821616, 12.973230190530057),
Offset(28.75116528764182, 13.133319374603126),
Offset(29.53492160504324, 13.510816894014384),
Offset(30.932137103121953, 14.376913458334252),
Offset(33.28838555685606, 16.624650919288428),
Offset(35.89432249628212, 23.37909352170482),
Offset(33.48392465035364, 31.477806524115046),
Offset(30.030077433051954, 34.89805459392186),
Offset(27.33235973933773, 36.577857882184276),
Offset(25.1989736925096, 37.50609764380484),
Offset(23.49355056041695, 37.98263525580348),
Offset(22.14477788581944, 38.17561412869281),
Offset(21.092888589213125, 38.217257284749074),
Offset(20.284788154551638, 38.18472099805207),
Offset(19.676878106356384, 38.12169428433597),
Offset(19.234798688321266, 38.052811818504196),
Offset(18.93153600117374, 37.99125390824871),
Offset(18.74595358223783, 37.94363830375375),
Offset(18.66077577959113, 37.914057688182396),
],
<Offset>[
Offset(28.257472499999995, 12.930571500000006),
Offset(28.366768481821616, 12.973230190530057),
Offset(28.75116528764182, 13.133319374603126),
Offset(29.53492160504324, 13.510816894014384),
Offset(30.932137103121953, 14.376913458334252),
Offset(33.28838555685606, 16.624650919288428),
Offset(35.89432249628212, 23.37909352170482),
Offset(33.48392465035364, 31.477806524115046),
Offset(30.030077433051954, 34.89805459392186),
Offset(27.33235973933773, 36.577857882184276),
Offset(25.1989736925096, 37.50609764380484),
Offset(23.49355056041695, 37.98263525580348),
Offset(22.14477788581944, 38.17561412869281),
Offset(21.092888589213125, 38.217257284749074),
Offset(20.284788154551638, 38.18472099805207),
Offset(19.676878106356384, 38.12169428433597),
Offset(19.234798688321266, 38.052811818504196),
Offset(18.93153600117374, 37.99125390824871),
Offset(18.74595358223783, 37.94363830375375),
Offset(18.66077577959113, 37.914057688182396),
],
),
_PathClose(
),
],
),
],
matchTextDirection: true,
);
| flutter/packages/flutter/lib/src/material/animated_icons/data/list_view.g.dart/0 | {'file_path': 'flutter/packages/flutter/lib/src/material/animated_icons/data/list_view.g.dart', 'repo_id': 'flutter', 'token_count': 113363} |
// 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 'dart:ui' show lerpDouble;
import 'package:flutter/foundation.dart';
import 'package:flutter/widgets.dart';
import 'theme.dart';
/// Defines default property values for descendant [Card] widgets.
///
/// Descendant widgets obtain the current [CardTheme] object using
/// `CardTheme.of(context)`. Instances of [CardTheme] can be
/// customized with [CardTheme.copyWith].
///
/// Typically a [CardTheme] is specified as part of the overall [Theme]
/// with [ThemeData.cardTheme].
///
/// All [CardTheme] properties are `null` by default. When null, the [Card]
/// will use the values from [ThemeData] if they exist, otherwise it will
/// provide its own defaults.
///
/// See also:
///
/// * [ThemeData], which describes the overall theme information for the
/// application.
@immutable
class CardTheme with Diagnosticable {
/// Creates a theme that can be used for [ThemeData.cardTheme].
///
/// The [elevation] must be null or non-negative.
const CardTheme({
this.clipBehavior,
this.color,
this.shadowColor,
this.surfaceTintColor,
this.elevation,
this.margin,
this.shape,
}) : assert(elevation == null || elevation >= 0.0);
/// Overrides the default value for [Card.clipBehavior].
///
/// If null, [Card] uses [Clip.none].
final Clip? clipBehavior;
/// Overrides the default value for [Card.color].
///
/// If null, [Card] uses [ThemeData.cardColor].
final Color? color;
/// Overrides the default value for [Card.shadowColor].
///
/// If null, [Card] defaults to fully opaque black.
final Color? shadowColor;
/// Overrides the default value for [Card.surfaceTintColor].
///
/// If null, [Card] will not display an overlay color.
///
/// See [Material.surfaceTintColor] for more details.
final Color? surfaceTintColor;
/// Overrides the default value for [Card.elevation].
///
/// If null, [Card] uses a default of 1.0.
final double? elevation;
/// Overrides the default value for [Card.margin].
///
/// If null, [Card] uses a default margin of 4.0 logical pixels on all sides:
/// `EdgeInsets.all(4.0)`.
final EdgeInsetsGeometry? margin;
/// Overrides the default value for [Card.shape].
///
/// If null, [Card] then uses a [RoundedRectangleBorder] with a circular
/// corner radius of 4.0.
final ShapeBorder? shape;
/// Creates a copy of this object with the given fields replaced with the
/// new values.
CardTheme copyWith({
Clip? clipBehavior,
Color? color,
Color? shadowColor,
Color? surfaceTintColor,
double? elevation,
EdgeInsetsGeometry? margin,
ShapeBorder? shape,
}) {
return CardTheme(
clipBehavior: clipBehavior ?? this.clipBehavior,
color: color ?? this.color,
shadowColor: shadowColor ?? this.shadowColor,
surfaceTintColor: surfaceTintColor ?? this.surfaceTintColor,
elevation: elevation ?? this.elevation,
margin: margin ?? this.margin,
shape: shape ?? this.shape,
);
}
/// The [ThemeData.cardTheme] property of the ambient [Theme].
static CardTheme of(BuildContext context) {
return Theme.of(context).cardTheme;
}
/// Linearly interpolate between two Card themes.
///
/// The argument `t` must not be null.
///
/// {@macro dart.ui.shadow.lerp}
static CardTheme lerp(CardTheme? a, CardTheme? b, double t) {
return CardTheme(
clipBehavior: t < 0.5 ? a?.clipBehavior : b?.clipBehavior,
color: Color.lerp(a?.color, b?.color, t),
shadowColor: Color.lerp(a?.shadowColor, b?.shadowColor, t),
surfaceTintColor: Color.lerp(a?.surfaceTintColor, b?.surfaceTintColor, t),
elevation: lerpDouble(a?.elevation, b?.elevation, t),
margin: EdgeInsetsGeometry.lerp(a?.margin, b?.margin, t),
shape: ShapeBorder.lerp(a?.shape, b?.shape, t),
);
}
@override
int get hashCode => Object.hash(
clipBehavior,
color,
shadowColor,
surfaceTintColor,
elevation,
margin,
shape,
);
@override
bool operator ==(Object other) {
if (identical(this, other)) {
return true;
}
if (other.runtimeType != runtimeType) {
return false;
}
return other is CardTheme
&& other.clipBehavior == clipBehavior
&& other.color == color
&& other.shadowColor == shadowColor
&& other.surfaceTintColor == surfaceTintColor
&& other.elevation == elevation
&& other.margin == margin
&& other.shape == shape;
}
@override
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
super.debugFillProperties(properties);
properties.add(DiagnosticsProperty<Clip>('clipBehavior', clipBehavior, defaultValue: null));
properties.add(ColorProperty('color', color, defaultValue: null));
properties.add(ColorProperty('shadowColor', shadowColor, defaultValue: null));
properties.add(ColorProperty('surfaceTintColor', surfaceTintColor, defaultValue: null));
properties.add(DiagnosticsProperty<double>('elevation', elevation, defaultValue: null));
properties.add(DiagnosticsProperty<EdgeInsetsGeometry>('margin', margin, defaultValue: null));
properties.add(DiagnosticsProperty<ShapeBorder>('shape', shape, defaultValue: null));
}
}
| flutter/packages/flutter/lib/src/material/card_theme.dart/0 | {'file_path': 'flutter/packages/flutter/lib/src/material/card_theme.dart', 'repo_id': 'flutter', 'token_count': 1824} |
// 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:flutter/widgets.dart';
/// A tile in a Material Design grid list.
///
/// A grid list is a [GridView] of tiles in a vertical and horizontal
/// array. Each tile typically contains some visually rich content (e.g., an
/// image) together with a [GridTileBar] in either a [header] or a [footer].
///
/// See also:
///
/// * [GridView], which is a scrollable grid of tiles.
/// * [GridTileBar], which is typically used in either the [header] or
/// [footer].
/// * <https://material.io/design/components/image-lists.html>
class GridTile extends StatelessWidget {
/// Creates a grid tile.
///
/// Must have a child. Does not typically have both a header and a footer.
const GridTile({
super.key,
this.header,
this.footer,
required this.child,
});
/// The widget to show over the top of this grid tile.
///
/// Typically a [GridTileBar].
final Widget? header;
/// The widget to show over the bottom of this grid tile.
///
/// Typically a [GridTileBar].
final Widget? footer;
/// The widget that fills the tile.
///
/// {@macro flutter.widgets.ProxyWidget.child}
final Widget child;
@override
Widget build(BuildContext context) {
if (header == null && footer == null) {
return child;
}
return Stack(
children: <Widget>[
Positioned.fill(
child: child,
),
if (header != null)
Positioned(
top: 0.0,
left: 0.0,
right: 0.0,
child: header!,
),
if (footer != null)
Positioned(
left: 0.0,
bottom: 0.0,
right: 0.0,
child: footer!,
),
],
);
}
}
| flutter/packages/flutter/lib/src/material/grid_tile.dart/0 | {'file_path': 'flutter/packages/flutter/lib/src/material/grid_tile.dart', 'repo_id': 'flutter', 'token_count': 737} |
// 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 'dart:ui' show lerpDouble;
import 'package:flutter/foundation.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter/widgets.dart';
import 'material_state.dart';
import 'navigation_drawer.dart';
import 'theme.dart';
// Examples can assume:
// late BuildContext context;
/// Defines default property values for descendant [NavigationDrawer]
/// widgets.
///
/// Descendant widgets obtain the current [NavigationDrawerThemeData] object
/// using `NavigationDrawerTheme.of(context)`. Instances of
/// [NavigationDrawerThemeData] can be customized with
/// [NavigationDrawerThemeData.copyWith].
///
/// Typically a [NavigationDrawerThemeData] is specified as part of the
/// overall [Theme] with [ThemeData.navigationDrawerTheme]. Alternatively, a
/// [NavigationDrawerTheme] inherited widget can be used to theme [NavigationDrawer]s
/// in a subtree of widgets.
///
/// All [NavigationDrawerThemeData] properties are `null` by default.
/// When null, the [NavigationDrawer] will provide its own defaults based on the
/// overall [Theme]'s textTheme and colorScheme. See the individual
/// [NavigationDrawer] properties for details.
///
/// See also:
///
/// * [ThemeData], which describes the overall theme information for the
/// application.
@immutable
class NavigationDrawerThemeData with Diagnosticable {
/// Creates a theme that can be used for [ThemeData.navigationDrawerTheme] and
/// [NavigationDrawerTheme].
const NavigationDrawerThemeData({
this.tileHeight,
this.backgroundColor,
this.elevation,
this.shadowColor,
this.surfaceTintColor,
this.indicatorColor,
this.indicatorShape,
this.indicatorSize,
this.labelTextStyle,
this.iconTheme,
});
/// Overrides the default height of [NavigationDrawerDestination].
final double? tileHeight;
/// Overrides the default value of [NavigationDrawer.backgroundColor].
final Color? backgroundColor;
/// Overrides the default value of [NavigationDrawer.elevation].
final double? elevation;
/// Overrides the default value of [NavigationDrawer.shadowColor].
final Color? shadowColor;
/// Overrides the default value of [NavigationDrawer.surfaceTintColor].
final Color? surfaceTintColor;
/// Overrides the default value of [NavigationDrawer]'s selection indicator.
final Color? indicatorColor;
/// Overrides the default shape of the [NavigationDrawer]'s selection indicator.
final ShapeBorder? indicatorShape;
/// Overrides the default size of the [NavigationDrawer]'s selection indicator.
final Size? indicatorSize;
/// The style to merge with the default text style for
/// [NavigationDestination] labels.
///
/// You can use this to specify a different style when the label is selected.
final MaterialStateProperty<TextStyle?>? labelTextStyle;
/// The theme to merge with the default icon theme for
/// [NavigationDestination] icons.
///
/// You can use this to specify a different icon theme when the icon is
/// selected.
final MaterialStateProperty<IconThemeData?>? iconTheme;
/// Creates a copy of this object with the given fields replaced with the
/// new values.
NavigationDrawerThemeData copyWith({
double? tileHeight,
Color? backgroundColor,
double? elevation,
Color? shadowColor,
Color? surfaceTintColor,
Color? indicatorColor,
ShapeBorder? indicatorShape,
Size? indicatorSize,
MaterialStateProperty<TextStyle?>? labelTextStyle,
MaterialStateProperty<IconThemeData?>? iconTheme,
}) {
return NavigationDrawerThemeData(
tileHeight: tileHeight ?? this.tileHeight,
backgroundColor: backgroundColor ?? this.backgroundColor,
elevation: elevation ?? this.elevation,
shadowColor: shadowColor ?? this.shadowColor,
surfaceTintColor: surfaceTintColor ?? this.surfaceTintColor,
indicatorColor: indicatorColor ?? this.indicatorColor,
indicatorShape: indicatorShape ?? this.indicatorShape,
indicatorSize: indicatorSize ?? this.indicatorSize,
labelTextStyle: labelTextStyle ?? this.labelTextStyle,
iconTheme: iconTheme ?? this.iconTheme,
);
}
/// Linearly interpolate between two navigation rail themes.
///
/// If both arguments are null then null is returned.
///
/// {@macro dart.ui.shadow.lerp}
static NavigationDrawerThemeData? lerp(
NavigationDrawerThemeData? a, NavigationDrawerThemeData? b, double t) {
if (a == null && b == null) {
return null;
}
return NavigationDrawerThemeData(
tileHeight: lerpDouble(a?.tileHeight, b?.tileHeight, t),
backgroundColor: Color.lerp(a?.backgroundColor, b?.backgroundColor, t),
elevation: lerpDouble(a?.elevation, b?.elevation, t),
shadowColor: Color.lerp(a?.shadowColor, b?.shadowColor, t),
surfaceTintColor: Color.lerp(a?.surfaceTintColor, b?.surfaceTintColor, t),
indicatorColor: Color.lerp(a?.indicatorColor, b?.indicatorColor, t),
indicatorShape: ShapeBorder.lerp(a?.indicatorShape, b?.indicatorShape, t),
indicatorSize: Size.lerp(a?.indicatorSize, a?.indicatorSize, t),
labelTextStyle: MaterialStateProperty.lerp<TextStyle?>(
a?.labelTextStyle, b?.labelTextStyle, t, TextStyle.lerp),
iconTheme: MaterialStateProperty.lerp<IconThemeData?>(
a?.iconTheme, b?.iconTheme, t, IconThemeData.lerp),
);
}
@override
int get hashCode => Object.hash(
tileHeight,
backgroundColor,
elevation,
shadowColor,
surfaceTintColor,
indicatorColor,
indicatorShape,
indicatorSize,
labelTextStyle,
iconTheme,
);
@override
bool operator ==(Object other) {
if (identical(this, other)) {
return true;
}
if (other.runtimeType != runtimeType) {
return false;
}
return other is NavigationDrawerThemeData &&
other.tileHeight == tileHeight &&
other.backgroundColor == backgroundColor &&
other.elevation == elevation &&
other.shadowColor == shadowColor &&
other.surfaceTintColor == surfaceTintColor &&
other.indicatorColor == indicatorColor &&
other.indicatorShape == indicatorShape &&
other.indicatorSize == indicatorSize &&
other.labelTextStyle == labelTextStyle &&
other.iconTheme == iconTheme;
}
@override
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
super.debugFillProperties(properties);
properties
.add(DoubleProperty('tileHeight', tileHeight, defaultValue: null));
properties.add(
ColorProperty('backgroundColor', backgroundColor, defaultValue: null));
properties.add(DoubleProperty('elevation', elevation, defaultValue: null));
properties.add(ColorProperty('shadowColor', shadowColor, defaultValue: null));
properties.add(ColorProperty('surfaceTintColor', surfaceTintColor,
defaultValue: null));
properties.add(
ColorProperty('indicatorColor', indicatorColor, defaultValue: null));
properties.add(DiagnosticsProperty<ShapeBorder>(
'indicatorShape', indicatorShape,
defaultValue: null));
properties.add(DiagnosticsProperty<Size>('indicatorSize', indicatorSize,
defaultValue: null));
properties.add(DiagnosticsProperty<MaterialStateProperty<TextStyle?>>(
'labelTextStyle', labelTextStyle,
defaultValue: null));
properties.add(DiagnosticsProperty<MaterialStateProperty<IconThemeData?>>(
'iconTheme', iconTheme,
defaultValue: null));
}
}
/// An inherited widget that defines visual properties for [NavigationDrawer]s and
/// [NavigationDestination]s in this widget's subtree.
///
/// Values specified here are used for [NavigationDrawer] properties that are not
/// given an explicit non-null value.
///
/// See also:
///
/// * [ThemeData.navigationDrawerTheme], which describes the
/// [NavigationDrawerThemeData] in the overall theme for the application.
class NavigationDrawerTheme extends InheritedTheme {
/// Creates a navigation rail theme that controls the
/// [NavigationDrawerThemeData] properties for a [NavigationDrawer].
///
/// The data argument must not be null.
const NavigationDrawerTheme({
super.key,
required this.data,
required super.child,
});
/// Specifies the background color, label text style, icon theme, and label
/// type values for descendant [NavigationDrawer] widgets.
final NavigationDrawerThemeData data;
/// The closest instance of this class that encloses the given context.
///
/// If there is no enclosing [NavigationDrawerTheme] widget, then
/// [ThemeData.navigationDrawerTheme] is used.
static NavigationDrawerThemeData of(BuildContext context) {
final NavigationDrawerTheme? navigationDrawerTheme =
context.dependOnInheritedWidgetOfExactType<NavigationDrawerTheme>();
return navigationDrawerTheme?.data ??
Theme.of(context).navigationDrawerTheme;
}
@override
Widget wrap(BuildContext context, Widget child) {
return NavigationDrawerTheme(data: data, child: child);
}
@override
bool updateShouldNotify(NavigationDrawerTheme oldWidget) =>
data != oldWidget.data;
}
| flutter/packages/flutter/lib/src/material/navigation_drawer_theme.dart/0 | {'file_path': 'flutter/packages/flutter/lib/src/material/navigation_drawer_theme.dart', 'repo_id': 'flutter', 'token_count': 2994} |
// 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 'dart:math' as math;
import 'package:flutter/foundation.dart';
import 'basic_types.dart';
import 'border_radius.dart';
import 'borders.dart';
import 'edge_insets.dart';
/// A rectangular border with smooth continuous transitions between the straight
/// sides and the rounded corners.
///
/// {@tool snippet}
/// ```dart
/// Widget build(BuildContext context) {
/// return Material(
/// shape: ContinuousRectangleBorder(
/// borderRadius: BorderRadius.circular(28.0),
/// ),
/// );
/// }
/// ```
/// {@end-tool}
///
/// See also:
///
/// * [RoundedRectangleBorder] Which creates rectangles with rounded corners,
/// however its straight sides change into a rounded corner with a circular
/// radius in a step function instead of gradually like the
/// [ContinuousRectangleBorder].
class ContinuousRectangleBorder extends OutlinedBorder {
/// The arguments must not be null.
const ContinuousRectangleBorder({
super.side,
this.borderRadius = BorderRadius.zero,
});
/// The radius for each corner.
///
/// Negative radius values are clamped to 0.0 by [getInnerPath] and
/// [getOuterPath].
final BorderRadiusGeometry borderRadius;
@override
EdgeInsetsGeometry get dimensions => EdgeInsets.all(side.width);
@override
ShapeBorder scale(double t) {
return ContinuousRectangleBorder(
side: side.scale(t),
borderRadius: borderRadius * t,
);
}
@override
ShapeBorder? lerpFrom(ShapeBorder? a, double t) {
if (a is ContinuousRectangleBorder) {
return ContinuousRectangleBorder(
side: BorderSide.lerp(a.side, side, t),
borderRadius: BorderRadiusGeometry.lerp(a.borderRadius, borderRadius, t)!,
);
}
return super.lerpFrom(a, t);
}
@override
ShapeBorder? lerpTo(ShapeBorder? b, double t) {
if (b is ContinuousRectangleBorder) {
return ContinuousRectangleBorder(
side: BorderSide.lerp(side, b.side, t),
borderRadius: BorderRadiusGeometry.lerp(borderRadius, b.borderRadius, t)!,
);
}
return super.lerpTo(b, t);
}
double _clampToShortest(RRect rrect, double value) {
return value > rrect.shortestSide ? rrect.shortestSide : value;
}
Path _getPath(RRect rrect) {
final double left = rrect.left;
final double right = rrect.right;
final double top = rrect.top;
final double bottom = rrect.bottom;
// Radii will be clamped to the value of the shortest side
// of rrect to avoid strange tie-fighter shapes.
final double tlRadiusX =
math.max(0.0, _clampToShortest(rrect, rrect.tlRadiusX));
final double tlRadiusY =
math.max(0.0, _clampToShortest(rrect, rrect.tlRadiusY));
final double trRadiusX =
math.max(0.0, _clampToShortest(rrect, rrect.trRadiusX));
final double trRadiusY =
math.max(0.0, _clampToShortest(rrect, rrect.trRadiusY));
final double blRadiusX =
math.max(0.0, _clampToShortest(rrect, rrect.blRadiusX));
final double blRadiusY =
math.max(0.0, _clampToShortest(rrect, rrect.blRadiusY));
final double brRadiusX =
math.max(0.0, _clampToShortest(rrect, rrect.brRadiusX));
final double brRadiusY =
math.max(0.0, _clampToShortest(rrect, rrect.brRadiusY));
return Path()
..moveTo(left, top + tlRadiusX)
..cubicTo(left, top, left, top, left + tlRadiusY, top)
..lineTo(right - trRadiusX, top)
..cubicTo(right, top, right, top, right, top + trRadiusY)
..lineTo(right, bottom - brRadiusX)
..cubicTo(right, bottom, right, bottom, right - brRadiusY, bottom)
..lineTo(left + blRadiusX, bottom)
..cubicTo(left, bottom, left, bottom, left, bottom - blRadiusY)
..close();
}
@override
Path getInnerPath(Rect rect, { TextDirection? textDirection }) {
return _getPath(borderRadius.resolve(textDirection).toRRect(rect).deflate(side.width));
}
@override
Path getOuterPath(Rect rect, { TextDirection? textDirection }) {
return _getPath(borderRadius.resolve(textDirection).toRRect(rect));
}
@override
ContinuousRectangleBorder copyWith({ BorderSide? side, BorderRadiusGeometry? borderRadius }) {
return ContinuousRectangleBorder(
side: side ?? this.side,
borderRadius: borderRadius ?? this.borderRadius,
);
}
@override
void paint(Canvas canvas, Rect rect, { TextDirection? textDirection }) {
if (rect.isEmpty) {
return;
}
switch (side.style) {
case BorderStyle.none:
break;
case BorderStyle.solid:
canvas.drawPath(
getOuterPath(rect, textDirection: textDirection),
side.toPaint(),
);
break;
}
}
@override
bool operator ==(Object other) {
if (other.runtimeType != runtimeType) {
return false;
}
return other is ContinuousRectangleBorder
&& other.side == side
&& other.borderRadius == borderRadius;
}
@override
int get hashCode => Object.hash(side, borderRadius);
@override
String toString() {
return '${objectRuntimeType(this, 'ContinuousRectangleBorder')}($side, $borderRadius)';
}
}
| flutter/packages/flutter/lib/src/painting/continuous_rectangle_border.dart/0 | {'file_path': 'flutter/packages/flutter/lib/src/painting/continuous_rectangle_border.dart', 'repo_id': 'flutter', 'token_count': 2012} |
// 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 'system_channels.dart';
/// Controls specific aspects of the system navigation stack.
class SystemNavigator {
// This class is not meant to be instantiated or extended; this constructor
// prevents instantiation and extension.
SystemNavigator._();
/// Removes the topmost Flutter instance, presenting what was before
/// it.
///
/// On Android, removes this activity from the stack and returns to
/// the previous activity.
///
/// On iOS, calls `popViewControllerAnimated:` if the root view
/// controller is a `UINavigationController`, or
/// `dismissViewControllerAnimated:completion:` if the top view
/// controller is a `FlutterViewController`.
///
/// The optional `animated` parameter is ignored on all platforms
/// except iOS where it is an argument to the aforementioned
/// methods.
///
/// This method should be preferred over calling `dart:io`'s [exit]
/// method, as the latter may cause the underlying platform to act
/// as if the application had crashed.
static Future<void> pop({bool? animated}) async {
await SystemChannels.platform.invokeMethod<void>('SystemNavigator.pop', animated);
}
/// Selects the single-entry history mode.
///
/// On web, this switches the browser history model to one that only tracks a
/// single entry, so that calling [routeInformationUpdated] replaces the
/// current entry.
///
/// Currently, this is ignored on other platforms.
///
/// See also:
///
/// * [selectMultiEntryHistory], which enables the browser history to have
/// multiple entries.
static Future<void> selectSingleEntryHistory() {
return SystemChannels.navigation.invokeMethod<void>('selectSingleEntryHistory');
}
/// Selects the multiple-entry history mode.
///
/// On web, this switches the browser history model to one that tracks all
/// updates to [routeInformationUpdated] to form a history stack. This is the
/// default.
///
/// Currently, this is ignored on other platforms.
///
/// See also:
///
/// * [selectSingleEntryHistory], which forces the history to only have one
/// entry.
static Future<void> selectMultiEntryHistory() {
return SystemChannels.navigation.invokeMethod<void>('selectMultiEntryHistory');
}
/// Notifies the platform for a route information change.
///
/// On web, this method behaves differently based on the single-entry or
/// multiple-entries history mode. Use the [selectSingleEntryHistory] and
/// [selectMultiEntryHistory] to toggle between modes.
///
/// For single-entry mode, this method replaces the current URL and state in
/// the current history entry. The flag `replace` is ignored.
///
/// For multiple-entries mode, this method creates a new history entry on top
/// of the current entry if the `replace` is false, thus the user will
/// be on a new history entry as if the user has visited a new page, and the
/// browser back button brings the user back to the previous entry. If
/// `replace` is true, this method only updates the URL and the state in the
/// current history entry without pushing a new one.
///
/// This method is ignored on other platforms.
///
/// The `replace` flag defaults to false.
static Future<void> routeInformationUpdated({
required String location,
Object? state,
bool replace = false,
}) {
return SystemChannels.navigation.invokeMethod<void>(
'routeInformationUpdated',
<String, dynamic>{
'location': location,
'state': state,
'replace': replace,
},
);
}
}
| flutter/packages/flutter/lib/src/services/system_navigator.dart/0 | {'file_path': 'flutter/packages/flutter/lib/src/services/system_navigator.dart', 'repo_id': 'flutter', 'token_count': 1021} |
// 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:flutter/foundation.dart';
import 'package:flutter_test/flutter_test.dart';
// ignore: unused_field
enum _TestEnum { a, b, c, d, e, f, g, h }
void main() {
test('BitField control test', () {
final BitField<_TestEnum> field = BitField<_TestEnum>(8);
expect(field[_TestEnum.d], isFalse);
field[_TestEnum.d] = true;
field[_TestEnum.e] = true;
expect(field[_TestEnum.c], isFalse);
expect(field[_TestEnum.d], isTrue);
expect(field[_TestEnum.e], isTrue);
field[_TestEnum.e] = false;
expect(field[_TestEnum.c], isFalse);
expect(field[_TestEnum.d], isTrue);
expect(field[_TestEnum.e], isFalse);
field.reset();
expect(field[_TestEnum.c], isFalse);
expect(field[_TestEnum.d], isFalse);
expect(field[_TestEnum.e], isFalse);
field.reset(true);
expect(field[_TestEnum.c], isTrue);
expect(field[_TestEnum.d], isTrue);
expect(field[_TestEnum.e], isTrue);
}, skip: isBrowser); // [intended] BitField is not supported when compiled to Javascript.
test('BitField.filed control test', () {
final BitField<_TestEnum> field1 = BitField<_TestEnum>.filled(8, true);
expect(field1[_TestEnum.d], isTrue);
final BitField<_TestEnum> field2 = BitField<_TestEnum>.filled(8, false);
expect(field2[_TestEnum.d], isFalse);
}, skip: isBrowser); // [intended] BitField is not supported when compiled to Javascript.
}
| flutter/packages/flutter/test/foundation/bit_field_test.dart/0 | {'file_path': 'flutter/packages/flutter/test/foundation/bit_field_test.dart', 'repo_id': 'flutter', 'token_count': 588} |
// 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:flutter/foundation.dart';
import 'package:flutter_test/flutter_test.dart';
void main() {
test('clampDouble', () {
expect(clampDouble(-1.0, 0.0, 1.0), equals(0.0));
expect(clampDouble(2.0, 0.0, 1.0), equals(1.0));
expect(clampDouble(double.infinity, 0.0, 1.0), equals(1.0));
expect(clampDouble(-double.infinity, 0.0, 1.0), equals(0.0));
expect(clampDouble(double.nan, 0.0, double.infinity), equals(double.infinity));
});
}
| flutter/packages/flutter/test/foundation/math_test.dart/0 | {'file_path': 'flutter/packages/flutter/test/foundation/math_test.dart', 'repo_id': 'flutter', 'token_count': 238} |
// 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:flutter/gestures.dart';
import 'package:flutter_test/flutter_test.dart';
void main() {
PointerEvent createSimulatedPointerAddedEvent(
int timeStampUs,
double x,
double y,
) {
return PointerAddedEvent(
timeStamp: Duration(microseconds: timeStampUs),
position: Offset(x, y),
);
}
PointerEvent createSimulatedPointerRemovedEvent(
int timeStampUs,
double x,
double y,
) {
return PointerRemovedEvent(
timeStamp: Duration(microseconds: timeStampUs),
position: Offset(x, y),
);
}
PointerEvent createSimulatedPointerDownEvent(
int timeStampUs,
double x,
double y,
) {
return PointerDownEvent(
timeStamp: Duration(microseconds: timeStampUs),
position: Offset(x, y),
);
}
PointerEvent createSimulatedPointerMoveEvent(
int timeStampUs,
double x,
double y,
double deltaX,
double deltaY,
) {
return PointerMoveEvent(
timeStamp: Duration(microseconds: timeStampUs),
position: Offset(x, y),
delta: Offset(deltaX, deltaY),
);
}
PointerEvent createSimulatedPointerHoverEvent(
int timeStampUs,
double x,
double y,
double deltaX,
double deltaY,
) {
return PointerHoverEvent(
timeStamp: Duration(microseconds: timeStampUs),
position: Offset(x, y),
delta: Offset(deltaX, deltaY),
);
}
PointerEvent createSimulatedPointerUpEvent(
int timeStampUs,
double x,
double y,
) {
return PointerUpEvent(
timeStamp: Duration(microseconds: timeStampUs),
position: Offset(x, y),
);
}
test('basic', () {
final PointerEventResampler resampler = PointerEventResampler();
final PointerEvent event0 = createSimulatedPointerAddedEvent(1000, 0.0, 50.0);
final PointerEvent event1 = createSimulatedPointerHoverEvent(2000, 10.0, 40.0, 10.0, -10.0);
final PointerEvent event2 = createSimulatedPointerDownEvent(2000, 10.0, 40.0);
final PointerEvent event3 = createSimulatedPointerMoveEvent(3000, 20.0, 30.0, 10.0, -10.0);
final PointerEvent event4 = createSimulatedPointerMoveEvent(4000, 30.0, 20.0, 10.0, -10.0);
final PointerEvent event5 = createSimulatedPointerUpEvent(4000, 30.0, 20.0);
final PointerEvent event6 = createSimulatedPointerHoverEvent(5000, 40.0, 10.0, 10.0, -10.0);
final PointerEvent event7 = createSimulatedPointerHoverEvent(6000, 50.0, 0.0, 10.0, -10.0);
final PointerEvent event8 = createSimulatedPointerRemovedEvent(6000, 50.0, 0.0);
resampler
..addEvent(event0)
..addEvent(event1)
..addEvent(event2)
..addEvent(event3)
..addEvent(event4)
..addEvent(event5)
..addEvent(event6)
..addEvent(event7)
..addEvent(event8);
final List<PointerEvent> result = <PointerEvent>[];
resampler.sample(const Duration(microseconds: 500), Duration.zero, result.add);
// No pointer event should have been returned yet.
expect(result.isEmpty, true);
resampler.sample(const Duration(microseconds: 1500), Duration.zero, result.add);
// Add pointer event should have been returned.
expect(result.length, 1);
expect(result[0].timeStamp, const Duration(microseconds: 1500));
expect(result[0] is PointerAddedEvent, true);
expect(result[0].position.dx, 5.0);
expect(result[0].position.dy, 45.0);
resampler.sample(const Duration(microseconds: 2500), Duration.zero, result.add);
// Hover and down pointer events should have been returned.
expect(result.length, 3);
expect(result[1].timeStamp, const Duration(microseconds: 2500));
expect(result[1] is PointerHoverEvent, true);
expect(result[1].position.dx, 15.0);
expect(result[1].position.dy, 35.0);
expect(result[1].delta.dx, 10.0);
expect(result[1].delta.dy, -10.0);
expect(result[2].timeStamp, const Duration(microseconds: 2500));
expect(result[2] is PointerDownEvent, true);
expect(result[2].position.dx, 15.0);
expect(result[2].position.dy, 35.0);
resampler.sample(const Duration(microseconds: 3500), Duration.zero, result.add);
// Move pointer event should have been returned.
expect(result.length, 4);
expect(result[3].timeStamp, const Duration(microseconds: 3500));
expect(result[3] is PointerMoveEvent, true);
expect(result[3].position.dx, 25.0);
expect(result[3].position.dy, 25.0);
expect(result[3].delta.dx, 10.0);
expect(result[3].delta.dy, -10.0);
resampler.sample(const Duration(microseconds: 4500), Duration.zero, result.add);
// Move and up pointer events should have been returned.
expect(result.length, 6);
expect(result[4].timeStamp, const Duration(microseconds: 4500));
expect(result[4] is PointerMoveEvent, true);
expect(result[4].position.dx, 35.0);
expect(result[4].position.dy, 15.0);
expect(result[4].delta.dx, 10.0);
expect(result[4].delta.dy, -10.0);
// buttons field needs to be a valid value
expect(result[4].buttons, kPrimaryButton);
expect(result[5].timeStamp, const Duration(microseconds: 4500));
expect(result[5] is PointerUpEvent, true);
expect(result[5].position.dx, 35.0);
expect(result[5].position.dy, 15.0);
resampler.sample(const Duration(microseconds: 5500), Duration.zero, result.add);
// Hover pointer event should have been returned.
expect(result.length, 7);
expect(result[6].timeStamp, const Duration(microseconds: 5500));
expect(result[6] is PointerHoverEvent, true);
expect(result[6].position.dx, 45.0);
expect(result[6].position.dy, 5.0);
expect(result[6].delta.dx, 10.0);
expect(result[6].delta.dy, -10.0);
resampler.sample(const Duration(microseconds: 6500), Duration.zero, result.add);
// Hover and removed pointer events should have been returned.
expect(result.length, 9);
expect(result[7].timeStamp, const Duration(microseconds: 6500));
expect(result[7] is PointerHoverEvent, true);
expect(result[7].position.dx, 50.0);
expect(result[7].position.dy, 0.0);
expect(result[7].delta.dx, 5.0);
expect(result[7].delta.dy, -5.0);
expect(result[8].timeStamp, const Duration(microseconds: 6500));
expect(result[8] is PointerRemovedEvent, true);
expect(result[8].position.dx, 50.0);
expect(result[8].position.dy, 0.0);
resampler.sample(const Duration(microseconds: 7500), Duration.zero, result.add);
// No pointer event should have been returned.
expect(result.length, 9);
});
test('stream', () {
final PointerEventResampler resampler = PointerEventResampler();
final PointerEvent event0 = createSimulatedPointerAddedEvent(1000, 0.0, 50.0);
final PointerEvent event1 = createSimulatedPointerHoverEvent(2000, 10.0, 40.0, 10.0, -10.0);
final PointerEvent event2 = createSimulatedPointerDownEvent(2000, 10.0, 40.0);
final PointerEvent event3 = createSimulatedPointerMoveEvent(3000, 20.0, 30.0, 10.0, -10.0);
final PointerEvent event4 = createSimulatedPointerMoveEvent(4000, 30.0, 20.0, 10.0, -10.0);
final PointerEvent event5 = createSimulatedPointerUpEvent(4000, 30.0, 20.0);
final PointerEvent event6 = createSimulatedPointerHoverEvent(5000, 40.0, 10.0, 10.0, -10.0);
final PointerEvent event7 = createSimulatedPointerHoverEvent(6000, 50.0, 0.0, 10.0, -10.0);
final PointerEvent event8 = createSimulatedPointerRemovedEvent(6000, 50.0, 0.0);
resampler.addEvent(event0);
//
// Initial sample time a 0.5 ms.
//
final List<PointerEvent> result = <PointerEvent>[];
resampler.sample(const Duration(microseconds: 500), Duration.zero, result.add);
// No pointer event should have been returned yet.
expect(result.isEmpty, true);
resampler
..addEvent(event1)
..addEvent(event2);
resampler.sample(const Duration(microseconds: 500), Duration.zero, result.add);
// No pointer event should have been returned yet.
expect(result.isEmpty, true);
//
// Advance sample time to 1.5 ms.
//
resampler.sample(const Duration(microseconds: 1500), Duration.zero, result.add);
// Added pointer event should have been returned.
expect(result.length, 1);
expect(result[0].timeStamp, const Duration(microseconds: 1500));
expect(result[0] is PointerAddedEvent, true);
expect(result[0].position.dx, 5.0);
expect(result[0].position.dy, 45.0);
resampler.addEvent(event3);
resampler.sample(const Duration(microseconds: 1500), Duration.zero, result.add);
// No more pointer events should have been returned.
expect(result.length, 1);
//
// Advance sample time to 2.5 ms.
//
resampler.sample(const Duration(microseconds: 2500), Duration.zero, result.add);
// Hover and down pointer events should have been returned.
expect(result.length, 3);
expect(result[1].timeStamp, const Duration(microseconds: 2500));
expect(result[1] is PointerHoverEvent, true);
expect(result[1].position.dx, 15.0);
expect(result[1].position.dy, 35.0);
expect(result[1].delta.dx, 10.0);
expect(result[1].delta.dy, -10.0);
expect(result[2].timeStamp, const Duration(microseconds: 2500));
expect(result[2] is PointerDownEvent, true);
expect(result[2].position.dx, 15.0);
expect(result[2].position.dy, 35.0);
resampler
..addEvent(event4)
..addEvent(event5);
resampler.sample(const Duration(microseconds: 2500), Duration.zero, result.add);
// No more pointer events should have been returned.
expect(result.length, 3);
//
// Advance sample time to 3.5 ms.
//
resampler.sample(const Duration(microseconds: 3500), Duration.zero, result.add);
// Move pointer event should have been returned.
expect(result.length, 4);
expect(result[3].timeStamp, const Duration(microseconds: 3500));
expect(result[3] is PointerMoveEvent, true);
expect(result[3].position.dx, 25.0);
expect(result[3].position.dy, 25.0);
expect(result[3].delta.dx, 10.0);
expect(result[3].delta.dy, -10.0);
resampler.addEvent(event6);
resampler.sample(const Duration(microseconds: 3500), Duration.zero, result.add);
// No more pointer events should have been returned.
expect(result.length, 4);
//
// Advance sample time to 4.5 ms.
//
resampler.sample(const Duration(microseconds: 4500), Duration.zero, result.add);
// Move and up pointer events should have been returned.
expect(result.length, 6);
expect(result[4].timeStamp, const Duration(microseconds: 4500));
expect(result[4] is PointerMoveEvent, true);
expect(result[4].position.dx, 35.0);
expect(result[4].position.dy, 15.0);
expect(result[4].delta.dx, 10.0);
expect(result[4].delta.dy, -10.0);
expect(result[5].timeStamp, const Duration(microseconds: 4500));
expect(result[5] is PointerUpEvent, true);
expect(result[5].position.dx, 35.0);
expect(result[5].position.dy, 15.0);
resampler
..addEvent(event7)
..addEvent(event8);
resampler.sample(const Duration(microseconds: 4500), Duration.zero, result.add);
// No more pointer events should have been returned.
expect(result.length, 6);
//
// Advance sample time to 5.5 ms.
//
resampler.sample(const Duration(microseconds: 5500), Duration.zero, result.add);
// Hover pointer event should have been returned.
expect(result.length, 7);
expect(result[6].timeStamp, const Duration(microseconds: 5500));
expect(result[6] is PointerHoverEvent, true);
expect(result[6].position.dx, 45.0);
expect(result[6].position.dy, 5.0);
expect(result[6].delta.dx, 10.0);
expect(result[6].delta.dy, -10.0);
//
// Advance sample time to 6.5 ms.
//
resampler.sample(const Duration(microseconds: 6500), Duration.zero, result.add);
// Hover and removed pointer event should have been returned.
expect(result.length, 9);
expect(result[7].timeStamp, const Duration(microseconds: 6500));
expect(result[7] is PointerHoverEvent, true);
expect(result[7].position.dx, 50.0);
expect(result[7].position.dy, 0.0);
expect(result[7].delta.dx, 5.0);
expect(result[7].delta.dy, -5.0);
expect(result[8].timeStamp, const Duration(microseconds: 6500));
expect(result[8] is PointerRemovedEvent, true);
expect(result[8].position.dx, 50.0);
expect(result[8].position.dy, 0.0);
//
// Advance sample time to 7.5 ms.
//
resampler.sample(const Duration(microseconds: 7500), Duration.zero, result.add);
// No pointer events should have been returned.
expect(result.length, 9);
});
test('quick tap', () {
final PointerEventResampler resampler = PointerEventResampler();
final PointerEvent event0 = createSimulatedPointerAddedEvent(1000, 0.0, 0.0);
final PointerEvent event1 = createSimulatedPointerDownEvent(1000, 0.0, 0.0);
final PointerEvent event2 = createSimulatedPointerUpEvent(1000, 0.0, 0.0);
final PointerEvent event3 = createSimulatedPointerRemovedEvent(1000, 0.0, 0.0);
resampler
..addEvent(event0)
..addEvent(event1)
..addEvent(event2)
..addEvent(event3);
final List<PointerEvent> result = <PointerEvent>[];
resampler.sample(const Duration(microseconds: 1500), Duration.zero, result.add);
// All pointer events should have been returned.
expect(result.length, 4);
expect(result[0].timeStamp, const Duration(microseconds: 1500));
expect(result[0] is PointerAddedEvent, true);
expect(result[0].position.dx, 0.0);
expect(result[0].position.dy, 0.0);
expect(result[1].timeStamp, const Duration(microseconds: 1500));
expect(result[1] is PointerDownEvent, true);
expect(result[1].position.dx, 0.0);
expect(result[1].position.dy, 0.0);
expect(result[2].timeStamp, const Duration(microseconds: 1500));
expect(result[2] is PointerUpEvent, true);
expect(result[2].position.dx, 0.0);
expect(result[2].position.dy, 0.0);
expect(result[3].timeStamp, const Duration(microseconds: 1500));
expect(result[3] is PointerRemovedEvent, true);
expect(result[3].position.dx, 0.0);
expect(result[3].position.dy, 0.0);
});
test('advance slowly', () {
final PointerEventResampler resampler = PointerEventResampler();
final PointerEvent event0 = createSimulatedPointerAddedEvent(1000, 0.0, 0.0);
final PointerEvent event1 = createSimulatedPointerDownEvent(1000, 0.0, 0.0);
final PointerEvent event2 = createSimulatedPointerMoveEvent(2000, 10.0, 0.0, 10.0, 0.0);
final PointerEvent event3 = createSimulatedPointerMoveEvent(3000, 20.0, 0.0, 10.0, 0.0);
final PointerEvent event4 = createSimulatedPointerUpEvent(3000, 20.0, 0.0);
final PointerEvent event5 = createSimulatedPointerRemovedEvent(3000, 20.0, 0.0);
resampler
..addEvent(event0)
..addEvent(event1)
..addEvent(event2)
..addEvent(event3)
..addEvent(event4)
..addEvent(event5);
final List<PointerEvent> result = <PointerEvent>[];
resampler.sample(const Duration(microseconds: 1500), Duration.zero, result.add);
// Added and down pointer events should have been returned.
expect(result.length, 2);
expect(result[0].timeStamp, const Duration(microseconds: 1500));
expect(result[0] is PointerAddedEvent, true);
expect(result[0].position.dx, 5.0);
expect(result[0].position.dy, 0.0);
expect(result[1].timeStamp, const Duration(microseconds: 1500));
expect(result[1] is PointerDownEvent, true);
expect(result[1].position.dx, 5.0);
expect(result[1].position.dy, 0.0);
resampler.sample(const Duration(microseconds: 1500), Duration.zero, result.add);
// No pointer events should have been returned.
expect(result.length, 2);
resampler.sample(const Duration(microseconds: 1750), Duration.zero, result.add);
// Move pointer event should have been returned.
expect(result.length, 3);
expect(result[2].timeStamp, const Duration(microseconds: 1750));
expect(result[2] is PointerMoveEvent, true);
expect(result[2].position.dx, 7.5);
expect(result[2].position.dy, 0.0);
expect(result[2].delta.dx, 2.5);
expect(result[2].delta.dy, 0.0);
resampler.sample(const Duration(microseconds: 2000), Duration.zero, result.add);
// Another move pointer event should have been returned.
expect(result.length, 4);
expect(result[3].timeStamp, const Duration(microseconds: 2000));
expect(result[3] is PointerMoveEvent, true);
expect(result[3].position.dx, 10.0);
expect(result[3].position.dy, 0.0);
expect(result[3].delta.dx, 2.5);
expect(result[3].delta.dy, 0.0);
resampler.sample(const Duration(microseconds: 3000), Duration.zero, result.add);
// Move, up and removed pointer events should have been returned.
expect(result.length, 7);
expect(result[4].timeStamp, const Duration(microseconds: 3000));
expect(result[4] is PointerMoveEvent, true);
expect(result[4].position.dx, 20.0);
expect(result[4].position.dy, 0.0);
expect(result[4].delta.dx, 10.0);
expect(result[4].delta.dy, 0.0);
expect(result[5].timeStamp, const Duration(microseconds: 3000));
expect(result[5] is PointerUpEvent, true);
expect(result[5].position.dx, 20.0);
expect(result[5].position.dy, 0.0);
expect(result[6].timeStamp, const Duration(microseconds: 3000));
expect(result[6] is PointerRemovedEvent, true);
expect(result[6].position.dx, 20.0);
expect(result[6].position.dy, 0.0);
});
test('advance fast', () {
final PointerEventResampler resampler = PointerEventResampler();
final PointerEvent event0 = createSimulatedPointerAddedEvent(1000, 0.0, 0.0);
final PointerEvent event1 = createSimulatedPointerDownEvent(1000, 0.0, 0.0);
final PointerEvent event2 = createSimulatedPointerMoveEvent(2000, 5.0, 0.0, 5.0, 0.0);
final PointerEvent event3 = createSimulatedPointerMoveEvent(3000, 20.0, 0.0, 15.0, 0.0);
final PointerEvent event4 = createSimulatedPointerUpEvent(4000, 30.0, 0.0);
final PointerEvent event5 = createSimulatedPointerRemovedEvent(4000, 30.0, 0.0);
resampler
..addEvent(event0)
..addEvent(event1)
..addEvent(event2)
..addEvent(event3)
..addEvent(event4)
..addEvent(event5);
final List<PointerEvent> result = <PointerEvent>[];
resampler.sample(const Duration(microseconds: 2500), Duration.zero, result.add);
// Addeds and down pointer events should have been returned.
expect(result.length, 2);
expect(result[0].timeStamp, const Duration(microseconds: 2500));
expect(result[0] is PointerAddedEvent, true);
expect(result[0].position.dx, 12.5);
expect(result[0].position.dy, 0.0);
expect(result[1].timeStamp, const Duration(microseconds: 2500));
expect(result[1] is PointerDownEvent, true);
expect(result[1].position.dx, 12.5);
expect(result[1].position.dy, 0.0);
resampler.sample(const Duration(microseconds: 5500), Duration.zero, result.add);
// Move, up and removed pointer events should have been returned.
expect(result.length, 5);
expect(result[2].timeStamp, const Duration(microseconds: 5500));
expect(result[2] is PointerMoveEvent, true);
expect(result[2].position.dx, 30.0);
expect(result[2].position.dy, 0.0);
expect(result[2].delta.dx, 17.5);
expect(result[2].delta.dy, 0.0);
expect(result[3].timeStamp, const Duration(microseconds: 5500));
expect(result[3] is PointerUpEvent, true);
expect(result[3].position.dx, 30.0);
expect(result[3].position.dy, 0.0);
expect(result[4].timeStamp, const Duration(microseconds: 5500));
expect(result[4] is PointerRemovedEvent, true);
expect(result[4].position.dx, 30.0);
expect(result[4].position.dy, 0.0);
resampler.sample(const Duration(microseconds: 6500), Duration.zero, result.add);
// No pointer events should have been returned.
expect(result.length, 5);
});
test('skip', () {
final PointerEventResampler resampler = PointerEventResampler();
final PointerEvent event0 = createSimulatedPointerAddedEvent(1000, 0.0, 0.0);
final PointerEvent event1 = createSimulatedPointerDownEvent(1000, 0.0, 0.0);
final PointerEvent event2 = createSimulatedPointerMoveEvent(2000, 10.0, 0.0, 10.0, 0.0);
final PointerEvent event3 = createSimulatedPointerUpEvent(3000, 10.0, 0.0);
final PointerEvent event4 = createSimulatedPointerHoverEvent(4000, 20.0, 0.0, 10.0, 0.0);
final PointerEvent event5 = createSimulatedPointerDownEvent(4000, 20.0, 0.0);
final PointerEvent event6 = createSimulatedPointerMoveEvent(5000, 30.0, 0.0, 10.0, 0.0);
final PointerEvent event7 = createSimulatedPointerUpEvent(5000, 30.0, 0.0);
final PointerEvent event8 = createSimulatedPointerRemovedEvent(5000, 30.0, 0.0);
resampler
..addEvent(event0)
..addEvent(event1)
..addEvent(event2)
..addEvent(event3)
..addEvent(event4)
..addEvent(event5)
..addEvent(event6)
..addEvent(event7)
..addEvent(event8);
final List<PointerEvent> result = <PointerEvent>[];
resampler.sample(const Duration(microseconds: 1500), Duration.zero, result.add);
// Added and down pointer events should have been returned.
expect(result.length, 2);
expect(result[0].timeStamp, const Duration(microseconds: 1500));
expect(result[0] is PointerAddedEvent, true);
expect(result[0].position.dx, 5.0);
expect(result[0].position.dy, 0.0);
expect(result[1].timeStamp, const Duration(microseconds: 1500));
expect(result[1] is PointerDownEvent, true);
expect(result[1].position.dx, 5.0);
expect(result[1].position.dy, 0.0);
resampler.sample(const Duration(microseconds: 5500), Duration.zero, result.add);
// All remaining pointer events should have been returned.
expect(result.length, 7);
expect(result[2].timeStamp, const Duration(microseconds: 5500));
expect(result[2] is PointerMoveEvent, true);
expect(result[2].position.dx, 30.0);
expect(result[2].position.dy, 0.0);
expect(result[2].delta.dx, 25.0);
expect(result[2].delta.dy, 0.0);
expect(result[3].timeStamp, const Duration(microseconds: 5500));
expect(result[3] is PointerUpEvent, true);
expect(result[3].position.dx, 30.0);
expect(result[3].position.dy, 0.0);
expect(result[4].timeStamp, const Duration(microseconds: 5500));
expect(result[4] is PointerDownEvent, true);
expect(result[4].position.dx, 30.0);
expect(result[4].position.dy, 0.0);
expect(result[5].timeStamp, const Duration(microseconds: 5500));
expect(result[5] is PointerUpEvent, true);
expect(result[5].position.dx, 30.0);
expect(result[5].position.dy, 0.0);
expect(result[6].timeStamp, const Duration(microseconds: 5500));
expect(result[6] is PointerRemovedEvent, true);
expect(result[6].position.dx, 30.0);
expect(result[6].position.dy, 0.0);
resampler.sample(const Duration(microseconds: 6500), Duration.zero, result.add);
// No pointer events should have been returned.
expect(result.length, 7);
});
test('skip all', () {
final PointerEventResampler resampler = PointerEventResampler();
final PointerEvent event0 = createSimulatedPointerAddedEvent(1000, 0.0, 0.0);
final PointerEvent event1 = createSimulatedPointerDownEvent(1000, 0.0, 0.0);
final PointerEvent event2 = createSimulatedPointerMoveEvent(4000, 30.0, 0.0, 30.0, 0.0);
final PointerEvent event3 = createSimulatedPointerUpEvent(4000, 30.0, 0.0);
final PointerEvent event4 = createSimulatedPointerRemovedEvent(4000, 30.0, 0.0);
resampler
..addEvent(event0)
..addEvent(event1)
..addEvent(event2)
..addEvent(event3)
..addEvent(event4);
final List<PointerEvent> result = <PointerEvent>[];
resampler.sample(const Duration(microseconds: 500), Duration.zero, result.add);
// No pointer events should have been returned.
expect(result.isEmpty, true);
resampler.sample(const Duration(microseconds: 5500), Duration.zero, result.add);
// All remaining pointer events should have been returned.
expect(result.length, 4);
expect(result[0].timeStamp, const Duration(microseconds: 5500));
expect(result[0] is PointerAddedEvent, true);
expect(result[0].position.dx, 30.0);
expect(result[0].position.dy, 0.0);
expect(result[1].timeStamp, const Duration(microseconds: 5500));
expect(result[1] is PointerDownEvent, true);
expect(result[1].position.dx, 30.0);
expect(result[1].position.dy, 0.0);
expect(result[2].timeStamp, const Duration(microseconds: 5500));
expect(result[2] is PointerUpEvent, true);
expect(result[2].position.dx, 30.0);
expect(result[2].position.dy, 0.0);
expect(result[3].timeStamp, const Duration(microseconds: 5500));
expect(result[3] is PointerRemovedEvent, true);
expect(result[3].position.dx, 30.0);
expect(result[3].position.dy, 0.0);
resampler.sample(const Duration(microseconds: 6500), Duration.zero, result.add);
// No pointer events should have been returned.
expect(result.length, 4);
});
test('stop', () {
final PointerEventResampler resampler = PointerEventResampler();
final PointerEvent event0 = createSimulatedPointerAddedEvent(1000, 0.0, 0.0);
final PointerEvent event1 = createSimulatedPointerDownEvent(2000, 0.0, 0.0);
final PointerEvent event2 = createSimulatedPointerMoveEvent(3000, 10.0, 0.0, 10.0, 0.0);
final PointerEvent event3 = createSimulatedPointerMoveEvent(4000, 20.0, 0.0, 10.0, 0.0);
final PointerEvent event4 = createSimulatedPointerUpEvent(4000, 20.0, 0.0);
final PointerEvent event5 = createSimulatedPointerRemovedEvent(5000, 20.0, 0.0);
resampler
..addEvent(event0)
..addEvent(event1)
..addEvent(event2)
..addEvent(event3)
..addEvent(event4)
..addEvent(event5);
final List<PointerEvent> result = <PointerEvent>[];
resampler.sample(const Duration(microseconds: 500), Duration.zero, result.add);
// No pointer events should have been returned.
expect(result.isEmpty, true);
resampler.stop(result.add);
// All pointer events should have been returned with original
// time stamps and positions.
expect(result.length, 6);
expect(result[0].timeStamp, const Duration(microseconds: 1000));
expect(result[0] is PointerAddedEvent, true);
expect(result[0].position.dx, 0.0);
expect(result[0].position.dy, 0.0);
expect(result[1].timeStamp, const Duration(microseconds: 2000));
expect(result[1] is PointerDownEvent, true);
expect(result[1].position.dx, 0.0);
expect(result[1].position.dy, 0.0);
expect(result[2].timeStamp, const Duration(microseconds: 3000));
expect(result[2] is PointerMoveEvent, true);
expect(result[2].position.dx, 10.0);
expect(result[2].position.dy, 0.0);
expect(result[2].delta.dx, 10.0);
expect(result[2].delta.dy, 0.0);
expect(result[3].timeStamp, const Duration(microseconds: 4000));
expect(result[3] is PointerMoveEvent, true);
expect(result[3].position.dx, 20.0);
expect(result[3].position.dy, 0.0);
expect(result[3].delta.dx, 10.0);
expect(result[3].delta.dy, 0.0);
expect(result[4].timeStamp, const Duration(microseconds: 4000));
expect(result[4] is PointerUpEvent, true);
expect(result[4].position.dx, 20.0);
expect(result[4].position.dy, 0.0);
expect(result[5].timeStamp, const Duration(microseconds: 5000));
expect(result[5] is PointerRemovedEvent, true);
expect(result[5].position.dx, 20.0);
expect(result[5].position.dy, 0.0);
resampler.sample(const Duration(microseconds: 10000), Duration.zero, result.add);
// No pointer events should have been returned.
expect(result.length, 6);
});
test('synthetic move', () {
final PointerEventResampler resampler = PointerEventResampler();
final PointerEvent event0 = createSimulatedPointerAddedEvent(1000, 0.0, 0.0);
final PointerEvent event1 = createSimulatedPointerDownEvent(2000, 0.0, 0.0);
final PointerEvent event2 = createSimulatedPointerMoveEvent(3000, 10.0, 0.0, 10.0, 0.0);
final PointerEvent event3 = createSimulatedPointerUpEvent(4000, 10.0, 0.0);
final PointerEvent event4 = createSimulatedPointerRemovedEvent(5000, 10.0, 0.0);
resampler
..addEvent(event0)
..addEvent(event1)
..addEvent(event2)
..addEvent(event3)
..addEvent(event4);
final List<PointerEvent> result = <PointerEvent>[];
resampler.sample(const Duration(microseconds: 500), Duration.zero, result.add);
// No pointer events should have been returned.
expect(result.isEmpty, true);
resampler.sample(const Duration(microseconds: 2000), Duration.zero, result.add);
// Added and down pointer events should have been returned.
expect(result.length, 2);
expect(result[0].timeStamp, const Duration(microseconds: 2000));
expect(result[0] is PointerAddedEvent, true);
expect(result[0].position.dx, 0.0);
expect(result[0].position.dy, 0.0);
expect(result[1].timeStamp, const Duration(microseconds: 2000));
expect(result[1] is PointerDownEvent, true);
expect(result[1].position.dx, 0.0);
expect(result[1].position.dy, 0.0);
resampler.sample(const Duration(microseconds: 5000), Duration.zero, result.add);
// All remaining pointer events and a synthetic move event should
// have been returned.
expect(result.length, 5);
expect(result[2].timeStamp, const Duration(microseconds: 5000));
expect(result[2] is PointerMoveEvent, true);
expect(result[2].position.dx, 10.0);
expect(result[2].position.dy, 0.0);
expect(result[2].delta.dx, 10.0);
expect(result[2].delta.dy, 0.0);
expect(result[3].timeStamp, const Duration(microseconds: 5000));
expect(result[3] is PointerUpEvent, true);
expect(result[3].position.dx, 10.0);
expect(result[3].position.dy, 0.0);
expect(result[4].timeStamp, const Duration(microseconds: 5000));
expect(result[4] is PointerRemovedEvent, true);
expect(result[4].position.dx, 10.0);
expect(result[4].position.dy, 0.0);
resampler.sample(const Duration(microseconds: 10000), Duration.zero, result.add);
// No pointer events should have been returned.
expect(result.length, 5);
});
test('next sample time', () {
final PointerEventResampler resampler = PointerEventResampler();
final PointerEvent event0 = createSimulatedPointerAddedEvent(1000, 0.0, 0.0);
final PointerEvent event1 = createSimulatedPointerDownEvent(1000, 0.0, 0.0);
final PointerEvent event2 = createSimulatedPointerMoveEvent(2000, 10.0, 0.0, 10.0, 0.0);
final PointerEvent event3 = createSimulatedPointerMoveEvent(3000, 20.0, 0.0, 10.0, 0.0);
final PointerEvent event4 = createSimulatedPointerUpEvent(3000, 20.0, 0.0);
final PointerEvent event5 = createSimulatedPointerHoverEvent(4000, 30.0, 0.0, 10.0, 0.0);
final PointerEvent event6 = createSimulatedPointerRemovedEvent(4000, 30.0, 0.0);
resampler
..addEvent(event0)
..addEvent(event1)
..addEvent(event2)
..addEvent(event3)
..addEvent(event4)
..addEvent(event5)
..addEvent(event6);
final List<PointerEvent> result = <PointerEvent>[];
Duration sampleTime = const Duration(microseconds: 500);
Duration nextSampleTime = const Duration(microseconds: 1500);
resampler.sample(sampleTime, nextSampleTime, result.add);
// No pointer events should have been returned.
expect(result.isEmpty, true);
sampleTime = nextSampleTime;
nextSampleTime = const Duration(microseconds: 2500);
resampler.sample(sampleTime, nextSampleTime, result.add);
// Added and down pointer events should have been returned.
expect(result.length, 2);
expect(result[0].timeStamp, const Duration(microseconds: 1500));
expect(result[0] is PointerAddedEvent, true);
expect(result[0].position.dx, 5.0);
expect(result[0].position.dy, 0.0);
expect(result[1].timeStamp, const Duration(microseconds: 1500));
expect(result[1] is PointerDownEvent, true);
expect(result[1].position.dx, 5.0);
expect(result[1].position.dy, 0.0);
sampleTime = nextSampleTime;
nextSampleTime = const Duration(microseconds: 3500);
resampler.sample(sampleTime, nextSampleTime, result.add);
// Move and up pointer events should have been returned.
expect(result.length, 4);
expect(result[2].timeStamp, const Duration(microseconds: 2500));
expect(result[2] is PointerMoveEvent, true);
expect(result[2].position.dx, 15.0);
expect(result[2].position.dy, 0.0);
expect(result[2].delta.dx, 10.0);
expect(result[2].delta.dy, 0.0);
expect(result[3].timeStamp, const Duration(microseconds: 2500));
expect(result[3] is PointerUpEvent, true);
expect(result[3].position.dx, 15.0);
expect(result[3].position.dy, 0.0);
sampleTime = nextSampleTime;
nextSampleTime = const Duration(microseconds: 4500);
resampler.sample(sampleTime, nextSampleTime, result.add);
// All remaining pointer events should have been returned.
expect(result.length, 6);
expect(result[4].timeStamp, const Duration(microseconds: 3500));
expect(result[4] is PointerHoverEvent, true);
expect(result[4].position.dx, 25.0);
expect(result[4].position.dy, 0.0);
expect(result[4].delta.dx, 10.0);
expect(result[4].delta.dy, 0.0);
expect(result[5].timeStamp, const Duration(microseconds: 3500));
expect(result[5] is PointerRemovedEvent, true);
expect(result[5].position.dx, 25.0);
expect(result[5].position.dy, 0.0);
resampler.sample(const Duration(microseconds: 10000), Duration.zero, result.add);
// No pointer events should have been returned.
expect(result.length, 6);
});
}
| flutter/packages/flutter/test/gestures/resampler_test.dart/0 | {'file_path': 'flutter/packages/flutter/test/gestures/resampler_test.dart', 'repo_id': 'flutter', 'token_count': 12750} |
// 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:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import '../rendering/mock_canvas.dart';
void main() {
// Regression test for https://github.com/flutter/flutter/issues/21506.
testWidgets('InkSplash receives textDirection', (WidgetTester tester) async {
await tester.pumpWidget(MaterialApp(
home: Scaffold(
appBar: AppBar(title: const Text('Button Border Test')),
body: Center(
child: ElevatedButton(
child: const Text('Test'),
onPressed: () { },
),
),
),
));
await tester.tap(find.text('Test'));
// start ink animation which asserts for a textDirection.
await tester.pumpAndSettle(const Duration(milliseconds: 30));
expect(tester.takeException(), isNull);
});
testWidgets('InkWell with NoSplash splashFactory paints nothing', (WidgetTester tester) async {
Widget buildFrame({ InteractiveInkFeatureFactory? splashFactory }) {
return MaterialApp(
home: Scaffold(
body: Center(
child: Material(
child: InkWell(
splashFactory: splashFactory,
onTap: () { },
child: const Text('test'),
),
),
),
),
);
}
// NoSplash.splashFactory, no splash circles drawn
await tester.pumpWidget(buildFrame(splashFactory: NoSplash.splashFactory));
{
final TestGesture gesture = await tester.startGesture(tester.getCenter(find.text('test')));
final MaterialInkController material = Material.of(tester.element(find.text('test')));
await tester.pump(const Duration(milliseconds: 200));
expect(material, paintsExactlyCountTimes(#drawCircle, 0));
await gesture.up();
await tester.pumpAndSettle();
}
// Default splashFactory (from Theme.of().splashFactory), one splash circle drawn.
await tester.pumpWidget(buildFrame());
{
final TestGesture gesture = await tester.startGesture(tester.getCenter(find.text('test')));
final MaterialInkController material = Material.of(tester.element(find.text('test')));
await tester.pump(const Duration(milliseconds: 200));
expect(material, paintsExactlyCountTimes(#drawCircle, 1));
await gesture.up();
await tester.pumpAndSettle();
}
});
}
| flutter/packages/flutter/test/material/ink_splash_test.dart/0 | {'file_path': 'flutter/packages/flutter/test/material/ink_splash_test.dart', 'repo_id': 'flutter', 'token_count': 996} |
// 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.
// This file is run as part of a reduced test set in CI on Mac and Windows
// machines.
@Tags(<String>['reduced-test-set'])
library;
import 'package:flutter/widgets.dart';
import 'package:flutter_test/flutter_test.dart';
void main() {
// Here and below, see: https://github.com/dart-lang/sdk/issues/26980
const FlutterLogoDecoration start = FlutterLogoDecoration(
textColor: Color(0xFFD4F144),
style: FlutterLogoStyle.stacked,
margin: EdgeInsets.all(10.0),
);
const FlutterLogoDecoration end = FlutterLogoDecoration(
textColor: Color(0xFF81D4FA),
style: FlutterLogoStyle.stacked,
margin: EdgeInsets.all(10.0),
);
test('FlutterLogoDecoration lerp from null to null is null', () {
final FlutterLogoDecoration? logo = FlutterLogoDecoration.lerp(null, null, 0.5);
expect(logo, isNull);
});
test('FlutterLogoDecoration lerp from non-null to null lerps margin', () {
final FlutterLogoDecoration logo = FlutterLogoDecoration.lerp(start, null, 0.4)!;
expect(logo.textColor, start.textColor);
expect(logo.style, start.style);
expect(logo.margin, start.margin * 0.4);
});
test('FlutterLogoDecoration lerp from null to non-null lerps margin', () {
final FlutterLogoDecoration logo = FlutterLogoDecoration.lerp(null, end, 0.6)!;
expect(logo.textColor, end.textColor);
expect(logo.style, end.style);
expect(logo.margin, end.margin * 0.6);
});
test('FlutterLogoDecoration lerps colors and margins', () {
final FlutterLogoDecoration logo = FlutterLogoDecoration.lerp(start, end, 0.5)!;
expect(logo.textColor, Color.lerp(start.textColor, end.textColor, 0.5));
expect(logo.margin, EdgeInsets.lerp(start.margin, end.margin, 0.5));
});
test('FlutterLogoDecoration.lerpFrom and FlutterLogoDecoration.lerpTo', () {
expect(Decoration.lerp(start, const BoxDecoration(), 0.0), start);
expect(Decoration.lerp(start, const BoxDecoration(), 1.0), const BoxDecoration());
expect(Decoration.lerp(const BoxDecoration(), end, 0.0), const BoxDecoration());
expect(Decoration.lerp(const BoxDecoration(), end, 1.0), end);
});
test('FlutterLogoDecoration lerp changes styles at 0.5', () {
FlutterLogoDecoration logo = FlutterLogoDecoration.lerp(start, end, 0.4)!;
expect(logo.style, start.style);
logo = FlutterLogoDecoration.lerp(start, end, 0.5)!;
expect(logo.style, end.style);
});
test('FlutterLogoDecoration toString', () {
expect(
start.toString(),
equals(
'FlutterLogoDecoration(textColor: Color(0xffd4f144), style: stacked)',
),
);
expect(
FlutterLogoDecoration.lerp(null, end, 0.5).toString(),
equals(
'FlutterLogoDecoration(textColor: Color(0xff81d4fa), style: stacked, transition -1.0:0.5)',
),
);
});
testWidgets('Flutter Logo golden test', (WidgetTester tester) async {
final Key logo = UniqueKey();
await tester.pumpWidget(Container(
key: logo,
decoration: const FlutterLogoDecoration(),
));
await expectLater(
find.byKey(logo),
matchesGoldenFile('flutter_logo.png'),
);
});
}
| flutter/packages/flutter/test/painting/flutter_logo_test.dart/0 | {'file_path': 'flutter/packages/flutter/test/painting/flutter_logo_test.dart', 'repo_id': 'flutter', 'token_count': 1256} |
// 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:flutter/rendering.dart';
import 'package:flutter_test/flutter_test.dart';
import 'rendering_tester.dart';
void main() {
TestRenderingFlutterBinding.ensureInitialized();
test('overflow should not affect baseline', () {
RenderBox root, child, text;
late double baseline1, baseline2, height1, height2;
root = RenderPositionedBox(
child: RenderCustomPaint(
child: child = text = RenderParagraph(
const TextSpan(text: 'Hello World'),
textDirection: TextDirection.ltr,
),
painter: TestCallbackPainter(
onPaint: () {
baseline1 = child.getDistanceToBaseline(TextBaseline.alphabetic)!;
height1 = text.size.height;
},
),
),
);
layout(root, phase: EnginePhase.paint);
root = RenderPositionedBox(
child: RenderCustomPaint(
child: child = RenderConstrainedOverflowBox(
child: text = RenderParagraph(
const TextSpan(text: 'Hello World'),
textDirection: TextDirection.ltr,
),
maxHeight: height1 / 2.0,
alignment: Alignment.topLeft,
),
painter: TestCallbackPainter(
onPaint: () {
baseline2 = child.getDistanceToBaseline(TextBaseline.alphabetic)!;
height2 = text.size.height;
},
),
),
);
layout(root, phase: EnginePhase.paint);
expect(baseline1, lessThan(height1));
expect(height2, equals(height1 / 2.0));
expect(baseline2, equals(baseline1));
expect(baseline2, greaterThan(height2));
});
}
| flutter/packages/flutter/test/rendering/overflow_test.dart/0 | {'file_path': 'flutter/packages/flutter/test/rendering/overflow_test.dart', 'repo_id': 'flutter', 'token_count': 745} |
// 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 'dart:ui';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter_test/flutter_test.dart';
void main() {
testWidgets('ImageFiltered avoids repainting child as it animates', (WidgetTester tester) async {
RenderTestObject.paintCount = 0;
await tester.pumpWidget(
ColoredBox(
color: Colors.red,
child: ImageFiltered(
imageFilter: ImageFilter.blur(sigmaX: 5, sigmaY: 5),
child: const TestWidget(),
),
)
);
expect(RenderTestObject.paintCount, 1);
await tester.pumpWidget(
ColoredBox(
color: Colors.red,
child: ImageFiltered(
imageFilter: ImageFilter.blur(sigmaX: 6, sigmaY: 6),
child: const TestWidget(),
),
)
);
expect(RenderTestObject.paintCount, 1);
});
}
class TestWidget extends SingleChildRenderObjectWidget {
const TestWidget({super.key, super.child});
@override
RenderObject createRenderObject(BuildContext context) {
return RenderTestObject();
}
}
class RenderTestObject extends RenderProxyBox {
static int paintCount = 0;
@override
void paint(PaintingContext context, Offset offset) {
paintCount += 1;
super.paint(context, offset);
}
}
| flutter/packages/flutter/test/widgets/animated_image_filtered_repaint_test.dart/0 | {'file_path': 'flutter/packages/flutter/test/widgets/animated_image_filtered_repaint_test.dart', 'repo_id': 'flutter', 'token_count': 543} |
// 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.
@TestOn('chrome')
library;
import 'dart:async';
import 'package:flutter/rendering.dart';
import 'package:flutter/services.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_test/flutter_test.dart';
import '../services/fake_platform_views.dart';
void main() {
group('HtmlElementView', () {
testWidgets('Create HTML view', (WidgetTester tester) async {
final int currentViewId = platformViewsRegistry.getNextPlatformViewId();
final FakeHtmlPlatformViewsController viewsController = FakeHtmlPlatformViewsController();
viewsController.registerViewType('webview');
await tester.pumpWidget(
const Center(
child: SizedBox(
width: 200.0,
height: 100.0,
child: HtmlElementView(viewType: 'webview'),
),
),
);
expect(
viewsController.views,
unorderedEquals(<FakeHtmlPlatformView>[
FakeHtmlPlatformView(currentViewId + 1, 'webview'),
]),
);
});
testWidgets('Create HTML view with PlatformViewCreatedCallback', (WidgetTester tester) async {
final int currentViewId = platformViewsRegistry.getNextPlatformViewId();
final FakeHtmlPlatformViewsController viewsController = FakeHtmlPlatformViewsController();
viewsController.registerViewType('webview');
bool hasPlatformViewCreated = false;
void onPlatformViewCreatedCallBack(int id) {
hasPlatformViewCreated = true;
}
await tester.pumpWidget(
Center(
child: SizedBox(
width: 200.0,
height: 100.0,
child: HtmlElementView(
viewType: 'webview',
onPlatformViewCreated: onPlatformViewCreatedCallBack,
),
),
),
);
// Check the onPlatformViewCreatedCallBack has been called.
expect(hasPlatformViewCreated, true);
expect(
viewsController.views,
unorderedEquals(<FakeHtmlPlatformView>[
FakeHtmlPlatformView(currentViewId + 1, 'webview'),
]),
);
});
testWidgets('Resize HTML view', (WidgetTester tester) async {
final int currentViewId = platformViewsRegistry.getNextPlatformViewId();
final FakeHtmlPlatformViewsController viewsController = FakeHtmlPlatformViewsController();
viewsController.registerViewType('webview');
await tester.pumpWidget(
const Center(
child: SizedBox(
width: 200.0,
height: 100.0,
child: HtmlElementView(viewType: 'webview'),
),
),
);
viewsController.resizeCompleter = Completer<void>();
await tester.pumpWidget(
const Center(
child: SizedBox(
width: 100.0,
height: 50.0,
child: HtmlElementView(viewType: 'webview'),
),
),
);
viewsController.resizeCompleter.complete();
await tester.pump();
expect(
viewsController.views,
unorderedEquals(<FakeHtmlPlatformView>[
FakeHtmlPlatformView(currentViewId + 1, 'webview'),
]),
);
});
testWidgets('Change HTML view type', (WidgetTester tester) async {
final int currentViewId = platformViewsRegistry.getNextPlatformViewId();
final FakeHtmlPlatformViewsController viewsController = FakeHtmlPlatformViewsController();
viewsController.registerViewType('webview');
viewsController.registerViewType('maps');
await tester.pumpWidget(
const Center(
child: SizedBox(
width: 200.0,
height: 100.0,
child: HtmlElementView(viewType: 'webview'),
),
),
);
await tester.pumpWidget(
const Center(
child: SizedBox(
width: 200.0,
height: 100.0,
child: HtmlElementView(viewType: 'maps'),
),
),
);
expect(
viewsController.views,
unorderedEquals(<FakeHtmlPlatformView>[
FakeHtmlPlatformView(currentViewId + 2, 'maps'),
]),
);
});
testWidgets('Dispose HTML view', (WidgetTester tester) async {
final FakeHtmlPlatformViewsController viewsController = FakeHtmlPlatformViewsController();
viewsController.registerViewType('webview');
await tester.pumpWidget(
const Center(
child: SizedBox(
width: 200.0,
height: 100.0,
child: HtmlElementView(viewType: 'webview'),
),
),
);
await tester.pumpWidget(
const Center(
child: SizedBox(
width: 200.0,
height: 100.0,
),
),
);
expect(
viewsController.views,
isEmpty,
);
});
testWidgets('HTML view survives widget tree change', (WidgetTester tester) async {
final int currentViewId = platformViewsRegistry.getNextPlatformViewId();
final FakeHtmlPlatformViewsController viewsController = FakeHtmlPlatformViewsController();
viewsController.registerViewType('webview');
final GlobalKey key = GlobalKey();
await tester.pumpWidget(
Center(
child: SizedBox(
width: 200.0,
height: 100.0,
child: HtmlElementView(viewType: 'webview', key: key),
),
),
);
await tester.pumpWidget(
Center(
child: SizedBox(
width: 200.0,
height: 100.0,
child: HtmlElementView(viewType: 'webview', key: key),
),
),
);
expect(
viewsController.views,
unorderedEquals(<FakeHtmlPlatformView>[
FakeHtmlPlatformView(currentViewId + 1, 'webview'),
]),
);
});
testWidgets('HtmlElementView has correct semantics', (WidgetTester tester) async {
final SemanticsHandle handle = tester.ensureSemantics();
final int currentViewId = platformViewsRegistry.getNextPlatformViewId();
expect(currentViewId, greaterThanOrEqualTo(0));
final FakeHtmlPlatformViewsController viewsController = FakeHtmlPlatformViewsController();
viewsController.registerViewType('webview');
await tester.pumpWidget(
Semantics(
container: true,
child: const Align(
alignment: Alignment.bottomRight,
child: SizedBox(
width: 200.0,
height: 100.0,
child: HtmlElementView(
viewType: 'webview',
),
),
),
),
);
// First frame is before the platform view was created so the render object
// is not yet in the tree.
await tester.pump();
// The platform view ID is set on the child of the HtmlElementView render object.
final SemanticsNode semantics = tester.getSemantics(find.byType(PlatformViewSurface));
expect(semantics.platformViewId, currentViewId + 1);
expect(semantics.rect, const Rect.fromLTWH(0, 0, 200, 100));
// A 200x100 rect positioned at bottom right of a 800x600 box.
expect(semantics.transform, Matrix4.translationValues(600, 500, 0));
expect(semantics.childrenCount, 0);
handle.dispose();
});
});
}
| flutter/packages/flutter/test/widgets/html_element_view_test.dart/0 | {'file_path': 'flutter/packages/flutter/test/widgets/html_element_view_test.dart', 'repo_id': 'flutter', 'token_count': 3252} |
// 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:flutter/widgets.dart';
import 'package:flutter_test/flutter_test.dart';
class MyNotification extends Notification { }
void main() {
testWidgets('Notification basics - toString', (WidgetTester tester) async {
expect(MyNotification(), hasOneLineDescription);
});
testWidgets('Notification basics - dispatch', (WidgetTester tester) async {
final List<dynamic> log = <dynamic>[];
final GlobalKey key = GlobalKey();
await tester.pumpWidget(NotificationListener<MyNotification>(
onNotification: (MyNotification value) {
log.add('a');
log.add(value);
return true;
},
child: NotificationListener<MyNotification>(
onNotification: (MyNotification value) {
log.add('b');
log.add(value);
return false;
},
child: Container(key: key),
),
));
expect(log, isEmpty);
final Notification notification = MyNotification();
expect(() { notification.dispatch(key.currentContext); }, isNot(throwsException));
expect(log, <dynamic>['b', notification, 'a', notification]);
});
testWidgets('Notification basics - cancel', (WidgetTester tester) async {
final List<dynamic> log = <dynamic>[];
final GlobalKey key = GlobalKey();
await tester.pumpWidget(NotificationListener<MyNotification>(
onNotification: (MyNotification value) {
log.add('a - error');
log.add(value);
return true;
},
child: NotificationListener<MyNotification>(
onNotification: (MyNotification value) {
log.add('b');
log.add(value);
return true;
},
child: Container(key: key),
),
));
expect(log, isEmpty);
final Notification notification = MyNotification();
expect(() { notification.dispatch(key.currentContext); }, isNot(throwsException));
expect(log, <dynamic>['b', notification]);
});
testWidgets('Notification basics - listener null return value', (WidgetTester tester) async {
final List<Type> log = <Type>[];
final GlobalKey key = GlobalKey();
await tester.pumpWidget(NotificationListener<MyNotification>(
onNotification: (MyNotification value) {
log.add(value.runtimeType);
return false;
},
child: NotificationListener<MyNotification>(
onNotification: (MyNotification value) => false,
child: Container(key: key),
),
));
expect(() { MyNotification().dispatch(key.currentContext); }, isNot(throwsException));
expect(log, <Type>[MyNotification]);
});
}
| flutter/packages/flutter/test/widgets/notification_test.dart/0 | {'file_path': 'flutter/packages/flutter/test/widgets/notification_test.dart', 'repo_id': 'flutter', 'token_count': 1012} |
// 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.
const List<String> kStates = <String>[
'Alabama',
'Alaska',
'Arizona',
'Arkansas',
'California',
'Colorado',
'Connecticut',
'Delaware',
'Florida',
'Georgia',
'Hawaii',
'Idaho',
'Illinois',
'Indiana',
'Iowa',
'Kansas',
'Kentucky',
'Louisiana',
'Maine',
'Maryland',
'Massachusetts',
'Michigan',
'Minnesota',
'Mississippi',
'Missouri',
'Montana',
'Nebraska',
'Nevada',
'New Hampshire',
'New Jersey',
'New Mexico',
'New York',
'North Carolina',
'North Dakota',
'Ohio',
'Oklahoma',
'Oregon',
'Pennsylvania',
'Rhode Island',
'South Carolina',
'South Dakota',
'Tennessee',
'Texas',
'Utah',
'Vermont',
'Virginia',
'Washington',
'West Virginia',
'Wisconsin',
'Wyoming',
];
| flutter/packages/flutter/test/widgets/states.dart/0 | {'file_path': 'flutter/packages/flutter/test/widgets/states.dart', 'repo_id': 'flutter', 'token_count': 342} |
# This ensures that parent analysis options do not accidentally break the fix tests.
| flutter/packages/flutter/test_fixes/analysis_options.yaml/0 | {'file_path': 'flutter/packages/flutter/test_fixes/analysis_options.yaml', 'repo_id': 'flutter', 'token_count': 16} |
// 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 'message.dart';
/// A Flutter Driver command that requests a string representation of the render tree.
class GetRenderTree extends Command {
/// Create a command to request a string representation of the render tree.
const GetRenderTree({ super.timeout });
/// Deserializes this command from the value generated by [serialize].
GetRenderTree.deserialize(super.json) : super.deserialize();
@override
String get kind => 'get_render_tree';
}
/// A string representation of the render tree, the result of a
/// [FlutterDriver.getRenderTree] method.
class RenderTree extends Result {
/// Creates a [RenderTree] object with the given string representation.
const RenderTree(this.tree);
/// String representation of the render tree.
final String? tree;
/// Deserializes the result from JSON.
static RenderTree fromJson(Map<String, dynamic> json) {
return RenderTree(json['tree'] as String);
}
@override
Map<String, dynamic> toJson() => <String, dynamic>{
'tree': tree,
};
}
| flutter/packages/flutter_driver/lib/src/common/render_tree.dart/0 | {'file_path': 'flutter/packages/flutter_driver/lib/src/common/render_tree.dart', 'repo_id': 'flutter', 'token_count': 325} |
// 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:flutter_driver/flutter_driver.dart';
class StubFinder extends SerializableFinder {
StubFinder(this.keyString);
final String keyString;
@override
String get finderType => 'Stub';
@override
Map<String, String> serialize() {
return super.serialize()..addAll(<String, String>{'keyString': keyString});
}
}
| flutter/packages/flutter_driver/test/src/real_tests/stubs/stub_finder.dart/0 | {'file_path': 'flutter/packages/flutter_driver/test/src/real_tests/stubs/stub_finder.dart', 'repo_id': 'flutter', 'token_count': 156} |
// 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.
/// Json response template for the contents of the auth_opt.json file created by
/// goldctl.
String authTemplate({
bool gsutil = false,
}) {
return '''
{
"Luci":false,
"ServiceAccount":"${gsutil ? '' : '/packages/flutter/test/widgets/serviceAccount.json'}",
"GSUtil":$gsutil
}
''';
}
/// Json response template for Skia Gold image request:
/// https://flutter-gold.skia.org/img/images/[imageHash].png
List<List<int>> imageResponseTemplate() {
return <List<int>>[
<int>[
137, 80, 78, 71, 13, 10, 26, 10, 0, 0, 0, 13, 73,
72, 68, 82, 0, 0, 0, 1, 0, 0, 0, 1, 8, 6, 0, 0, 0, 31, 21, 196, 137, 0,
],
<int>[
0, 0, 11, 73, 68, 65, 84, 120, 1, 99, 97, 0, 2, 0,
0, 25, 0, 5, 144, 240, 54, 245, 0, 0, 0, 0, 73, 69, 78, 68, 174, 66, 96,
130,
],
];
}
| flutter/packages/flutter_goldens/test/json_templates.dart/0 | {'file_path': 'flutter/packages/flutter_goldens/test/json_templates.dart', 'repo_id': 'flutter', 'token_count': 417} |
// 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.
// See also test_async_utils.dart which has some stack manipulation code.
import 'package:flutter/foundation.dart';
/// Report call site for `expect()` call. Returns the number of frames that
/// should be elided if a stack were to be modified to hide the expect call, or
/// zero if no such call was found.
///
/// If the head of the stack trace consists of a failure as a result of calling
/// the test_widgets [expect] function, this will fill the given
/// FlutterErrorBuilder with the precise file and line number that called that
/// function.
int reportExpectCall(StackTrace stack, List<DiagnosticsNode> information) {
final RegExp line0 = RegExp(r'^#0 +fail \(.+\)$');
final RegExp line1 = RegExp(r'^#1 +_expect \(.+\)$');
final RegExp line2 = RegExp(r'^#2 +expect \(.+\)$');
final RegExp line3 = RegExp(r'^#3 +expect \(.+\)$');
final RegExp line4 = RegExp(r'^#4 +[^(]+ \((.+?):([0-9]+)(?::[0-9]+)?\)$');
final List<String> stackLines = stack.toString().split('\n');
if (line0.firstMatch(stackLines[0]) != null &&
line1.firstMatch(stackLines[1]) != null &&
line2.firstMatch(stackLines[2]) != null &&
line3.firstMatch(stackLines[3]) != null) {
final Match expectMatch = line4.firstMatch(stackLines[4])!;
assert(expectMatch.groupCount == 2);
information.add(DiagnosticsStackTrace.singleFrame(
'This was caught by the test expectation on the following line',
frame: '${expectMatch.group(1)} line ${expectMatch.group(2)}',
));
return 4;
}
return 0;
}
| flutter/packages/flutter_test/lib/src/stack_manipulation.dart/0 | {'file_path': 'flutter/packages/flutter_test/lib/src/stack_manipulation.dart', 'repo_id': 'flutter', 'token_count': 580} |
// 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 'dart:async';
import 'package:flutter/foundation.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:stack_trace/stack_trace.dart' as stack_trace;
Future<void> main() async {
test('demangles stacks', () async {
// Test that the tester bindings unmangle stacks that come in as
// package:stack_trace types.
// Uses runTest directly so that the test does not get hung up waiting for
// the error reporter to be reset to the original one.
final Completer<FlutterErrorDetails> errorCompleter = Completer<FlutterErrorDetails>();
final TestExceptionReporter oldReporter = reportTestException;
reportTestException = (FlutterErrorDetails details, String testDescription) {
errorCompleter.complete(details);
reportTestException = oldReporter;
};
final AutomatedTestWidgetsFlutterBinding binding = AutomatedTestWidgetsFlutterBinding();
await binding.runTest(() async {
final Completer<String> completer = Completer<String>();
completer.future.then(
(String value) {},
onError: (Object error, StackTrace stack) {
assert(stack is stack_trace.Chain);
FlutterError.reportError(FlutterErrorDetails(
exception: error,
stack: stack,
));
}
);
completer.completeError(const CustomException());
}, () { });
final FlutterErrorDetails details = await errorCompleter.future;
expect(details, isNotNull);
expect(details.exception, isA<CustomException>());
reportTestException = oldReporter;
});
}
class CustomException implements Exception {
const CustomException();
}
| flutter/packages/flutter_test/test/bindings_async_gap_test.dart/0 | {'file_path': 'flutter/packages/flutter_test/test/bindings_async_gap_test.dart', 'repo_id': 'flutter', 'token_count': 610} |
// 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 'dart:io';
import 'package:flutter/widgets.dart';
import 'package:flutter_test/flutter_test.dart';
void main() {
test('Initializes httpOverrides and testTextInput', () async {
expect(HttpOverrides.current, null);
final TestWidgetsFlutterBinding binding = CustomBindings();
expect(WidgetsBinding.instance, isA<CustomBindings>());
expect(binding.testTextInput.isRegistered, false);
expect(HttpOverrides.current, null);
});
}
class CustomBindings extends AutomatedTestWidgetsFlutterBinding {
@override
bool get overrideHttpClient => false;
@override
bool get registerTestTextInput => false;
}
| flutter/packages/flutter_test/test/integration_bindings_test.dart/0 | {'file_path': 'flutter/packages/flutter_test/test/integration_bindings_test.dart', 'repo_id': 'flutter', 'token_count': 251} |
// 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 'dart:math' as math;
import 'logger.dart';
import 'platform.dart';
import 'terminal.dart';
const String fire = '🔥';
const int maxLineWidth = 84;
/// Encapsulates the help text construction and printing.
class CommandHelp {
CommandHelp({
required Logger logger,
required AnsiTerminal terminal,
required Platform platform,
required OutputPreferences outputPreferences,
}) : _logger = logger,
_terminal = terminal,
_platform = platform,
_outputPreferences = outputPreferences;
final Logger _logger;
final AnsiTerminal _terminal;
final Platform _platform;
final OutputPreferences _outputPreferences;
// COMMANDS IN ALPHABETICAL ORDER.
// Uppercase first, then lowercase.
// When updating this, update all the tests in command_help_test.dart accordingly.
late final CommandHelpOption I = _makeOption(
'I',
'Toggle oversized image inversion.',
'debugInvertOversizedImages',
);
late final CommandHelpOption L = _makeOption(
'L',
'Dump layer tree to the console.',
'debugDumpLayerTree',
);
late final CommandHelpOption M = _makeOption(
'M',
'Write SkSL shaders to a unique file in the project directory.',
);
late final CommandHelpOption P = _makeOption(
'P',
'Toggle performance overlay.',
'WidgetsApp.showPerformanceOverlay',
);
late final CommandHelpOption R = _makeOption(
'R',
'Hot restart.',
);
late final CommandHelpOption S = _makeOption(
'S',
'Dump accessibility tree in traversal order.',
'debugDumpSemantics',
);
late final CommandHelpOption U = _makeOption(
'U',
'Dump accessibility tree in inverse hit test order.',
'debugDumpSemantics',
);
late final CommandHelpOption a = _makeOption(
'a',
'Toggle timeline events for all widget build methods.',
'debugProfileWidgetBuilds',
);
late final CommandHelpOption b = _makeOption(
'b',
'Toggle platform brightness (dark and light mode).',
'debugBrightnessOverride',
);
late final CommandHelpOption c = _makeOption(
'c',
'Clear the screen',
);
late final CommandHelpOption d = _makeOption(
'd',
'Detach (terminate "flutter run" but leave application running).',
);
late final CommandHelpOption g = _makeOption(
'g',
'Run source code generators.'
);
late final CommandHelpOption hWithDetails = _makeOption(
'h',
'Repeat this help message.',
);
late final CommandHelpOption hWithoutDetails = _makeOption(
'h',
'List all available interactive commands.',
);
late final CommandHelpOption i = _makeOption(
'i',
'Toggle widget inspector.',
'WidgetsApp.showWidgetInspectorOverride',
);
late final CommandHelpOption j = _makeOption(
'j',
'Dump frame raster stats for the current frame. (Unsupported for web)',
);
late final CommandHelpOption k = _makeOption(
'k',
'Toggle CanvasKit rendering.',
);
late final CommandHelpOption o = _makeOption(
'o',
'Simulate different operating systems.',
'defaultTargetPlatform',
);
late final CommandHelpOption p = _makeOption(
'p',
'Toggle the display of construction lines.',
'debugPaintSizeEnabled',
);
late final CommandHelpOption q = _makeOption(
'q',
'Quit (terminate the application on the device).',
);
late final CommandHelpOption r = _makeOption(
'r',
'Hot reload. $fire$fire$fire',
);
late final CommandHelpOption s = _makeOption(
's',
'Save a screenshot to flutter.png.',
);
late final CommandHelpOption t = _makeOption(
't',
'Dump rendering tree to the console.',
'debugDumpRenderTree',
);
late final CommandHelpOption v = _makeOption(
'v',
'Open Flutter DevTools.',
);
late final CommandHelpOption w = _makeOption(
'w',
'Dump widget hierarchy to the console.',
'debugDumpApp',
);
// When updating the list above, see the notes above the list regarding order
// and tests.
CommandHelpOption _makeOption(String key, String description, [
String inParenthesis = '',
]) {
return CommandHelpOption(
key,
description,
inParenthesis: inParenthesis,
logger: _logger,
terminal: _terminal,
platform: _platform,
outputPreferences: _outputPreferences,
);
}
}
/// Encapsulates printing help text for a single option.
class CommandHelpOption {
CommandHelpOption(
this.key,
this.description, {
this.inParenthesis = '',
required Logger logger,
required Terminal terminal,
required Platform platform,
required OutputPreferences outputPreferences,
}) : _logger = logger,
_terminal = terminal,
_platform = platform,
_outputPreferences = outputPreferences;
final Logger _logger;
final Terminal _terminal;
final Platform _platform;
final OutputPreferences _outputPreferences;
/// The key associated with this command.
final String key;
/// A description of what this command does.
final String description;
/// Text shown in parenthesis to give the context.
final String inParenthesis;
bool get _hasTextInParenthesis => inParenthesis.isNotEmpty;
int get _rawMessageLength => key.length + description.length;
@override
String toString() {
final StringBuffer message = StringBuffer();
message.writeAll(<String>[_terminal.bolden(key), description], ' ');
if (!_hasTextInParenthesis) {
return message.toString();
}
bool wrap = false;
final int maxWidth = math.max(
_outputPreferences.wrapColumn,
maxLineWidth,
);
final int adjustedMessageLength = _platform.stdoutSupportsAnsi
? _rawMessageLength + 1
: message.length;
int width = maxWidth - adjustedMessageLength;
final String parentheticalText = '($inParenthesis)';
if (width < parentheticalText.length) {
width = maxWidth;
wrap = true;
}
if (wrap) {
message.write('\n');
}
// pad according to the raw text
message.write(''.padLeft(width - parentheticalText.length));
message.write(_terminal.color(parentheticalText, TerminalColor.grey));
// Terminals seem to require this because we have both bolded and colored
// a line. Otherwise the next line comes out bold until a reset bold.
if (_terminal.supportsColor) {
message.write(AnsiTerminal.resetBold);
}
return message.toString();
}
void print() {
_logger.printStatus(toString());
}
}
| flutter/packages/flutter_tools/lib/src/base/command_help.dart/0 | {'file_path': 'flutter/packages/flutter_tools/lib/src/base/command_help.dart', 'repo_id': 'flutter', 'token_count': 2235} |
// 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 'dart:async';
import 'package:dds/dds.dart' as dds;
import 'package:file/file.dart';
import 'package:meta/meta.dart';
import 'package:package_config/package_config_types.dart';
import 'package:vm_service/vm_service.dart' as vm_service;
import '../application_package.dart';
import '../base/common.dart';
import '../base/logger.dart';
import '../base/process.dart';
import '../build_info.dart';
import '../device.dart';
import '../resident_runner.dart';
import '../sksl_writer.dart';
import '../vmservice.dart';
import 'web_driver_service.dart';
class FlutterDriverFactory {
FlutterDriverFactory({
required ApplicationPackageFactory applicationPackageFactory,
required Logger logger,
required ProcessUtils processUtils,
required String dartSdkPath,
required DevtoolsLauncher devtoolsLauncher,
}) : _applicationPackageFactory = applicationPackageFactory,
_logger = logger,
_processUtils = processUtils,
_dartSdkPath = dartSdkPath,
_devtoolsLauncher = devtoolsLauncher;
final ApplicationPackageFactory _applicationPackageFactory;
final Logger _logger;
final ProcessUtils _processUtils;
final String _dartSdkPath;
final DevtoolsLauncher _devtoolsLauncher;
/// Create a driver service for running `flutter drive`.
DriverService createDriverService(bool web) {
if (web) {
return WebDriverService(
logger: _logger,
processUtils: _processUtils,
dartSdkPath: _dartSdkPath,
);
}
return FlutterDriverService(
logger: _logger,
processUtils: _processUtils,
dartSdkPath: _dartSdkPath,
applicationPackageFactory: _applicationPackageFactory,
devtoolsLauncher: _devtoolsLauncher,
);
}
}
/// An interface for the `flutter driver` integration test operations.
abstract class DriverService {
/// Install and launch the application for the provided [device].
Future<void> start(
BuildInfo buildInfo,
Device device,
DebuggingOptions debuggingOptions,
bool ipv6, {
File? applicationBinary,
String? route,
String? userIdentifier,
String? mainPath,
Map<String, Object> platformArgs = const <String, Object>{},
});
/// If --use-existing-app is provided, configured the correct VM Service URI.
Future<void> reuseApplication(
Uri vmServiceUri,
Device device,
DebuggingOptions debuggingOptions,
bool ipv6,
);
/// Start the test file with the provided [arguments] and [environment], returning
/// the test process exit code.
///
/// if [profileMemory] is provided, it will be treated as a file path to write a
/// devtools memory profile.
Future<int> startTest(
String testFile,
List<String> arguments,
Map<String, String> environment,
PackageConfig packageConfig, {
bool? headless,
String? chromeBinary,
String? browserName,
bool? androidEmulator,
int? driverPort,
List<String> webBrowserFlags,
List<String>? browserDimension,
String? profileMemory,
});
/// Stop the running application and uninstall it from the device.
///
/// If [writeSkslOnExit] is non-null, will connect to the VM Service
/// and write SkSL to the file. This is only supported on mobile and
/// desktop devices.
Future<void> stop({
File? writeSkslOnExit,
String? userIdentifier,
});
}
/// An implementation of the driver service that connects to mobile and desktop
/// applications.
class FlutterDriverService extends DriverService {
FlutterDriverService({
required ApplicationPackageFactory applicationPackageFactory,
required Logger logger,
required ProcessUtils processUtils,
required String dartSdkPath,
required DevtoolsLauncher devtoolsLauncher,
@visibleForTesting VMServiceConnector vmServiceConnector = connectToVmService,
}) : _applicationPackageFactory = applicationPackageFactory,
_logger = logger,
_processUtils = processUtils,
_dartSdkPath = dartSdkPath,
_vmServiceConnector = vmServiceConnector,
_devtoolsLauncher = devtoolsLauncher;
static const int _kLaunchAttempts = 3;
final ApplicationPackageFactory _applicationPackageFactory;
final Logger _logger;
final ProcessUtils _processUtils;
final String _dartSdkPath;
final VMServiceConnector _vmServiceConnector;
final DevtoolsLauncher _devtoolsLauncher;
Device? _device;
ApplicationPackage? _applicationPackage;
late String _vmServiceUri;
late FlutterVmService _vmService;
@override
Future<void> start(
BuildInfo buildInfo,
Device device,
DebuggingOptions debuggingOptions,
bool ipv6, {
File? applicationBinary,
String? route,
String? userIdentifier,
Map<String, Object> platformArgs = const <String, Object>{},
String? mainPath,
}) async {
if (buildInfo.isRelease) {
throwToolExit(
'Flutter Driver (non-web) does not support running in release mode.\n'
'\n'
'Use --profile mode for testing application performance.\n'
'Use --debug (default) mode for testing correctness (with assertions).'
);
}
_device = device;
final TargetPlatform targetPlatform = await device.targetPlatform;
_applicationPackage = await _applicationPackageFactory.getPackageForPlatform(
targetPlatform,
buildInfo: buildInfo,
applicationBinary: applicationBinary,
);
int attempt = 0;
LaunchResult? result;
bool prebuiltApplication = applicationBinary != null;
while (attempt < _kLaunchAttempts) {
result = await device.startApp(
_applicationPackage,
mainPath: mainPath,
route: route,
debuggingOptions: debuggingOptions,
platformArgs: platformArgs,
userIdentifier: userIdentifier,
prebuiltApplication: prebuiltApplication,
);
if (result.started) {
break;
}
// On attempts past 1, assume the application is built correctly and re-use it.
attempt += 1;
prebuiltApplication = true;
_logger.printError('Application failed to start on attempt: $attempt');
}
if (result == null || !result.started) {
throwToolExit('Application failed to start. Will not run test. Quitting.', exitCode: 1);
}
return reuseApplication(
result.observatoryUri!,
device,
debuggingOptions,
ipv6,
);
}
@override
Future<void> reuseApplication(
Uri vmServiceUri,
Device device,
DebuggingOptions debuggingOptions,
bool ipv6,
) async {
Uri uri;
if (vmServiceUri.scheme == 'ws') {
final List<String> segments = vmServiceUri.pathSegments.toList();
segments.remove('ws');
uri = vmServiceUri.replace(scheme: 'http', path: segments.join('/'));
} else {
uri = vmServiceUri;
}
_vmServiceUri = uri.toString();
_device = device;
if (debuggingOptions.enableDds) {
try {
await device.dds.startDartDevelopmentService(
uri,
hostPort: debuggingOptions.ddsPort,
ipv6: ipv6,
disableServiceAuthCodes: debuggingOptions.disableServiceAuthCodes,
logger: _logger,
);
_vmServiceUri = device.dds.uri.toString();
} on dds.DartDevelopmentServiceException {
// If there's another flutter_tools instance still connected to the target
// application, DDS will already be running remotely and this call will fail.
// This can be ignored to continue to use the existing remote DDS instance.
}
}
_vmService = await _vmServiceConnector(uri, device: _device, logger: _logger);
final DeviceLogReader logReader = await device.getLogReader(app: _applicationPackage);
logReader.logLines.listen(_logger.printStatus);
final vm_service.VM vm = await _vmService.service.getVM();
logReader.appPid = vm.pid;
}
@override
Future<int> startTest(
String testFile,
List<String> arguments,
Map<String, String> environment,
PackageConfig packageConfig, {
bool? headless,
String? chromeBinary,
String? browserName,
bool? androidEmulator,
int? driverPort,
List<String> webBrowserFlags = const <String>[],
List<String>? browserDimension,
String? profileMemory,
}) async {
if (profileMemory != null) {
unawaited(_devtoolsLauncher.launch(
Uri.parse(_vmServiceUri),
additionalArguments: <String>['--record-memory-profile=$profileMemory'],
));
// When profiling memory the original launch future will never complete.
await _devtoolsLauncher.processStart;
}
try {
final int result = await _processUtils.stream(<String>[
_dartSdkPath,
...<String>[...arguments, testFile, '-rexpanded'],
], environment: <String, String>{
'VM_SERVICE_URL': _vmServiceUri,
...environment,
});
return result;
} finally {
if (profileMemory != null) {
await _devtoolsLauncher.close();
}
}
}
@override
Future<void> stop({
File? writeSkslOnExit,
String? userIdentifier,
}) async {
if (writeSkslOnExit != null) {
final FlutterView flutterView = (await _vmService.getFlutterViews()).first;
final Map<String, Object?>? result = await _vmService.getSkSLs(
viewId: flutterView.id
);
await sharedSkSlWriter(_device!, result, outputFile: writeSkslOnExit, logger: _logger);
}
// If the application package is available, stop and uninstall.
final ApplicationPackage? package = _applicationPackage;
if (package != null) {
if (!await _device!.stopApp(package, userIdentifier: userIdentifier)) {
_logger.printError('Failed to stop app');
}
if (!await _device!.uninstallApp(package, userIdentifier: userIdentifier)) {
_logger.printError('Failed to uninstall app');
}
} else if (_device!.supportsFlutterExit) {
// Otherwise use the VM Service URI to stop the app as a best effort approach.
final vm_service.VM vm = await _vmService.service.getVM();
final vm_service.IsolateRef isolateRef = vm.isolates!
.firstWhere((vm_service.IsolateRef element) {
return !element.isSystemIsolate!;
});
unawaited(_vmService.flutterExit(isolateId: isolateRef.id!));
} else {
_logger.printTrace('No application package for $_device, leaving app running');
}
await _device!.dispose();
}
}
| flutter/packages/flutter_tools/lib/src/drive/drive_service.dart/0 | {'file_path': 'flutter/packages/flutter_tools/lib/src/drive/drive_service.dart', 'repo_id': 'flutter', 'token_count': 3753} |
// 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 'dart:async';
import '../base/file_system.dart';
import '../base/io.dart';
import '../base/platform.dart';
import '../convert.dart';
import '../globals.dart' as globals;
import 'fuchsia_ffx.dart';
import 'fuchsia_kernel_compiler.dart';
import 'fuchsia_pm.dart';
/// Returns [true] if the current platform supports Fuchsia targets.
bool isFuchsiaSupportedPlatform(Platform platform) {
return platform.isLinux || platform.isMacOS;
}
/// The Fuchsia SDK shell commands.
///
/// This workflow assumes development within the fuchsia source tree,
/// including a working fx command-line tool in the user's PATH.
class FuchsiaSdk {
/// Interface to the 'pm' tool.
late final FuchsiaPM fuchsiaPM = FuchsiaPM();
/// Interface to the 'kernel_compiler' tool.
late final FuchsiaKernelCompiler fuchsiaKernelCompiler = FuchsiaKernelCompiler();
/// Interface to the 'ffx' tool.
late final FuchsiaFfx fuchsiaFfx = FuchsiaFfx();
/// Returns any attached devices is a newline-denominated String.
///
/// Example output: abcd::abcd:abc:abcd:abcd%qemu scare-cable-skip-joy
Future<String?> listDevices({Duration? timeout}) async {
final File? ffx = globals.fuchsiaArtifacts?.ffx;
if (ffx == null || !ffx.existsSync()) {
return null;
}
final List<String>? devices = await fuchsiaFfx.list(timeout: timeout);
if (devices == null) {
return null;
}
return devices.isNotEmpty ? devices.join('\n') : null;
}
/// Returns the fuchsia system logs for an attached device where
/// [id] is the IP address of the device.
Stream<String>? syslogs(String id) {
Process? process;
try {
final StreamController<String> controller = StreamController<String>(onCancel: () {
process?.kill();
});
final File? sshConfig = globals.fuchsiaArtifacts?.sshConfig;
if (sshConfig == null || !sshConfig.existsSync()) {
globals.printError('Cannot read device logs: No ssh config.');
globals.printError('Have you set FUCHSIA_SSH_CONFIG or FUCHSIA_BUILD_DIR?');
return null;
}
const String remoteCommand = 'log_listener --clock Local';
final List<String> cmd = <String>[
'ssh',
'-F',
sshConfig.absolute.path,
id, // The device's IP.
remoteCommand,
];
globals.processManager.start(cmd).then((Process newProcess) {
if (controller.isClosed) {
return;
}
process = newProcess;
process?.exitCode.whenComplete(controller.close);
controller.addStream(process!.stdout
.transform(utf8.decoder)
.transform(const LineSplitter()));
});
return controller.stream;
} on Exception catch (exception) {
globals.printTrace('$exception');
}
return const Stream<String>.empty();
}
}
/// Fuchsia-specific artifacts used to interact with a device.
class FuchsiaArtifacts {
/// Creates a new [FuchsiaArtifacts].
FuchsiaArtifacts({
this.sshConfig,
this.ffx,
this.pm,
});
/// Creates a new [FuchsiaArtifacts] using the cached Fuchsia SDK.
///
/// Finds tools under bin/cache/artifacts/fuchsia/tools.
/// Queries environment variables (first FUCHSIA_BUILD_DIR, then
/// FUCHSIA_SSH_CONFIG) to find the ssh configuration needed to talk to
/// a device.
factory FuchsiaArtifacts.find() {
if (!isFuchsiaSupportedPlatform(globals.platform)) {
// Don't try to find the artifacts on platforms that are not supported.
return FuchsiaArtifacts();
}
// If FUCHSIA_BUILD_DIR is defined, then look for the ssh_config dir
// relative to it. Next, if FUCHSIA_SSH_CONFIG is defined, then use it.
// TODO(zanderso): Consider passing the ssh config path in with a flag.
File? sshConfig;
if (globals.platform.environment.containsKey(_kFuchsiaBuildDir)) {
sshConfig = globals.fs.file(globals.fs.path.join(
globals.platform.environment[_kFuchsiaBuildDir]!, 'ssh-keys', 'ssh_config'));
} else if (globals.platform.environment.containsKey(_kFuchsiaSshConfig)) {
sshConfig = globals.fs.file(globals.platform.environment[_kFuchsiaSshConfig]);
}
final String fuchsia = globals.cache.getArtifactDirectory('fuchsia').path;
final String tools = globals.fs.path.join(fuchsia, 'tools');
final File ffx = globals.fs.file(globals.fs.path.join(tools, 'x64/ffx'));
final File pm = globals.fs.file(globals.fs.path.join(tools, 'pm'));
return FuchsiaArtifacts(
sshConfig: sshConfig,
ffx: ffx.existsSync() ? ffx : null,
pm: pm.existsSync() ? pm : null,
);
}
static const String _kFuchsiaSshConfig = 'FUCHSIA_SSH_CONFIG';
static const String _kFuchsiaBuildDir = 'FUCHSIA_BUILD_DIR';
/// The location of the SSH configuration file used to interact with a
/// Fuchsia device.
final File? sshConfig;
/// The location of the ffx tool used to locate connected
/// Fuchsia devices.
final File? ffx;
/// The pm tool.
final File? pm;
/// Returns true if the [sshConfig] file is not null and exists.
bool get hasSshConfig => sshConfig != null && sshConfig!.existsSync();
}
| flutter/packages/flutter_tools/lib/src/fuchsia/fuchsia_sdk.dart/0 | {'file_path': 'flutter/packages/flutter_tools/lib/src/fuchsia/fuchsia_sdk.dart', 'repo_id': 'flutter', 'token_count': 1957} |
// 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 '../../base/file_system.dart';
import '../../base/project_migrator.dart';
import '../../xcode_project.dart';
const String _kDisableMinimumFrameDurationKey = 'CADisableMinimumFrameDurationOnPhone';
const String _kIndirectInputEventsKey = 'UIApplicationSupportsIndirectInputEvents';
/// Update Info.plist.
class HostAppInfoPlistMigration extends ProjectMigrator {
HostAppInfoPlistMigration(
IosProject project,
super.logger,
) : _infoPlist = project.defaultHostInfoPlist;
final File _infoPlist;
@override
void migrate() {
if (!_infoPlist.existsSync()) {
logger.printTrace('Info.plist not found, skipping host app Info.plist migration.');
return;
}
processFileLines(_infoPlist);
}
@override
String migrateFileContents(String fileContents) {
String newContents = fileContents;
if (!newContents.contains(_kDisableMinimumFrameDurationKey)) {
logger.printTrace('Adding $_kDisableMinimumFrameDurationKey to Info.plist');
const String plistEnd = '''
</dict>
</plist>
''';
const String plistWithKey = '''
<key>$_kDisableMinimumFrameDurationKey</key>
<true/>
</dict>
</plist>
''';
newContents = newContents.replaceAll(plistEnd, plistWithKey);
}
if (!newContents.contains(_kIndirectInputEventsKey)) {
logger.printTrace('Adding $_kIndirectInputEventsKey to Info.plist');
const String plistEnd = '''
</dict>
</plist>
''';
const String plistWithKey = '''
<key>$_kIndirectInputEventsKey</key>
<true/>
</dict>
</plist>
''';
newContents = newContents.replaceAll(plistEnd, plistWithKey);
}
return newContents;
}
}
| flutter/packages/flutter_tools/lib/src/ios/migrations/host_app_info_plist_migration.dart/0 | {'file_path': 'flutter/packages/flutter_tools/lib/src/ios/migrations/host_app_info_plist_migration.dart', 'repo_id': 'flutter', 'token_count': 632} |
// 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:package_config/package_config.dart';
import 'base/file_system.dart';
/// Processes dependencies into a string representing the NOTICES file.
///
/// Reads the NOTICES or LICENSE file from each package in the .packages file,
/// splitting each one into each component license so that it can be de-duped
/// if possible. If the NOTICES file exists, it is preferred over the LICENSE
/// file.
///
/// Individual licenses inside each LICENSE file should be separated by 80
/// hyphens on their own on a line.
///
/// If a LICENSE or NOTICES file contains more than one component license,
/// then each component license must start with the names of the packages to
/// which the component license applies, with each package name on its own line
/// and the list of package names separated from the actual license text by a
/// blank line. The packages need not match the names of the pub package. For
/// example, a package might itself contain code from multiple third-party
/// sources, and might need to include a license for each one.
class LicenseCollector {
LicenseCollector({
required FileSystem fileSystem
}) : _fileSystem = fileSystem;
final FileSystem _fileSystem;
/// The expected separator for multiple licenses.
static final String licenseSeparator = '\n${'-' * 80}\n';
/// Obtain licenses from the `packageMap` into a single result.
///
/// [additionalLicenses] should contain aggregated license files from all
/// of the current applications dependencies.
LicenseResult obtainLicenses(
PackageConfig packageConfig,
Map<String, List<File>> additionalLicenses,
) {
final Map<String, Set<String>> packageLicenses = <String, Set<String>>{};
final Set<String> allPackages = <String>{};
final List<File> dependencies = <File>[];
for (final Package package in packageConfig.packages) {
final Uri packageUri = package.packageUriRoot;
if (packageUri.scheme != 'file') {
continue;
}
// First check for NOTICES, then fallback to LICENSE
File file = _fileSystem.file(packageUri.resolve('../NOTICES'));
if (!file.existsSync()) {
file = _fileSystem.file(packageUri.resolve('../LICENSE'));
}
if (!file.existsSync()) {
continue;
}
dependencies.add(file);
final List<String> rawLicenses = file
.readAsStringSync()
.split(licenseSeparator);
for (final String rawLicense in rawLicenses) {
List<String> packageNames = <String>[];
String? licenseText;
if (rawLicenses.length > 1) {
final int split = rawLicense.indexOf('\n\n');
if (split >= 0) {
packageNames = rawLicense.substring(0, split).split('\n');
licenseText = rawLicense.substring(split + 2);
}
}
if (licenseText == null) {
packageNames = <String>[package.name];
licenseText = rawLicense;
}
packageLicenses.putIfAbsent(licenseText, () => <String>{}).addAll(packageNames);
allPackages.addAll(packageNames);
}
}
final List<String> combinedLicensesList = packageLicenses.keys
.map<String>((String license) {
final List<String> packageNames = packageLicenses[license]!.toList()
..sort();
return '${packageNames.join('\n')}\n\n$license';
}).toList();
combinedLicensesList.sort();
/// Append additional LICENSE files as specified in the pubspec.yaml.
final List<String> additionalLicenseText = <String>[];
final List<String> errorMessages = <String>[];
for (final String package in additionalLicenses.keys) {
for (final File license in additionalLicenses[package]!) {
if (!license.existsSync()) {
errorMessages.add(
'package $package specified an additional license at ${license.path}, but this file '
'does not exist.'
);
continue;
}
dependencies.add(license);
try {
additionalLicenseText.add(license.readAsStringSync());
} on FormatException catch (err) {
// File has an invalid encoding.
errorMessages.add(
'package $package specified an additional license at ${license.path}, but this file '
'could not be read:\n$err'
);
} on FileSystemException catch (err) {
// File cannot be parsed.
errorMessages.add(
'package $package specified an additional license at ${license.path}, but this file '
'could not be read:\n$err'
);
}
}
}
if (errorMessages.isNotEmpty) {
return LicenseResult(
combinedLicenses: '',
dependencies: <File>[],
errorMessages: errorMessages,
);
}
final String combinedLicenses = combinedLicensesList
.followedBy(additionalLicenseText)
.join(licenseSeparator);
return LicenseResult(
combinedLicenses: combinedLicenses,
dependencies: dependencies,
errorMessages: errorMessages,
);
}
}
/// The result of processing licenses with a [LicenseCollector].
class LicenseResult {
const LicenseResult({
required this.combinedLicenses,
required this.dependencies,
required this.errorMessages,
});
/// The raw text of the consumed licenses.
final String combinedLicenses;
/// Each license file that was consumed as input.
final List<File> dependencies;
/// If non-empty, license collection failed and this messages should
/// be displayed by the asset parser.
final List<String> errorMessages;
}
| flutter/packages/flutter_tools/lib/src/license_collector.dart/0 | {'file_path': 'flutter/packages/flutter_tools/lib/src/license_collector.dart', 'repo_id': 'flutter', 'token_count': 2015} |
// 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 '../base/platform.dart';
import '../doctor_validator.dart';
import '../features.dart';
class WebWorkflow extends Workflow {
const WebWorkflow({
required Platform platform,
required FeatureFlags featureFlags,
}) : _platform = platform,
_featureFlags = featureFlags;
final Platform _platform;
final FeatureFlags _featureFlags;
@override
bool get appliesToHostPlatform => _featureFlags.isWebEnabled &&
(_platform.isWindows ||
_platform.isMacOS ||
_platform.isLinux);
@override
bool get canLaunchDevices => _featureFlags.isWebEnabled;
@override
bool get canListDevices => _featureFlags.isWebEnabled;
@override
bool get canListEmulators => false;
}
| flutter/packages/flutter_tools/lib/src/web/workflow.dart/0 | {'file_path': 'flutter/packages/flutter_tools/lib/src/web/workflow.dart', 'repo_id': 'flutter', 'token_count': 269} |
// 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:flutter_tools/src/commands/analyze_base.dart';
import '../../src/common.dart';
void main() {
testWithoutContext('AnalyzeBase message formatting with zero issues', () async {
final String message = AnalyzeBase.generateErrorsMessage(
issueCount: 0,
seconds: '10',
);
expect(message, 'No issues found! (ran in 10s)');
});
testWithoutContext('AnalyzeBase message formatting with one issue', () async {
final String message = AnalyzeBase.generateErrorsMessage(
issueCount: 1,
seconds: '10',
);
expect(message, '1 issue found. (ran in 10s)');
});
testWithoutContext('AnalyzeBase message formatting with N issues', () async {
final String message = AnalyzeBase.generateErrorsMessage(
issueCount: 10,
seconds: '10',
);
expect(message, '10 issues found. (ran in 10s)');
});
testWithoutContext('AnalyzeBase message with analyze files', () async {
final String message = AnalyzeBase.generateErrorsMessage(
issueCount: 0,
seconds: '10',
files: 10,
);
expect(message, 'No issues found! • analyzed 10 files (ran in 10s)');
});
testWithoutContext('AnalyzeBase message with positive issue diff', () async {
final String message = AnalyzeBase.generateErrorsMessage(
issueCount: 1,
seconds: '10',
issueDiff: 1,
);
expect(message, '1 issue found. (1 new) (ran in 10s)');
});
testWithoutContext('AnalyzeBase message with negative issue diff', () async {
final String message = AnalyzeBase.generateErrorsMessage(
issueCount: 0,
seconds: '10',
issueDiff: -1,
);
expect(message, 'No issues found! (1 fixed) (ran in 10s)');
});
}
| flutter/packages/flutter_tools/test/general.shard/commands/analyze_base_test.dart/0 | {'file_path': 'flutter/packages/flutter_tools/test/general.shard/commands/analyze_base_test.dart', 'repo_id': 'flutter', 'token_count': 646} |
// 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:flutter_tools/src/html_utils.dart';
import '../src/common.dart';
const String htmlSample1 = '''
<!DOCTYPE html>
<html>
<head>
<title></title>
<base href="/foo/222/">
<meta charset="utf-8">
<link rel="icon" type="image/png" href="favicon.png"/>
</head>
<body>
<div></div>
<script src="main.dart.js"></script>
</body>
</html>
''';
const String htmlSample2 = '''
<!DOCTYPE html>
<html>
<head>
<title></title>
<base href="$kBaseHrefPlaceholder">
<meta charset="utf-8">
<link rel="icon" type="image/png" href="favicon.png"/>
</head>
<body>
<div></div>
<script src="main.dart.js"></script>
<script>
var serviceWorkerVersion = null;
</script>
<script>
navigator.serviceWorker.register('flutter_service_worker.js');
</script>
</body>
</html>
''';
String htmlSample2Replaced({
required String baseHref,
required String serviceWorkerVersion,
}) =>
'''
<!DOCTYPE html>
<html>
<head>
<title></title>
<base href="$baseHref">
<meta charset="utf-8">
<link rel="icon" type="image/png" href="favicon.png"/>
</head>
<body>
<div></div>
<script src="main.dart.js"></script>
<script>
var serviceWorkerVersion = "$serviceWorkerVersion";
</script>
<script>
navigator.serviceWorker.register('flutter_service_worker.js?v=$serviceWorkerVersion');
</script>
</body>
</html>
''';
const String htmlSample3 = '''
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset="utf-8">
<link rel="icon" type="image/png" href="favicon.png"/>
</head>
<body>
<div></div>
<script src="main.dart.js"></script>
</body>
</html>
''';
void main() {
test('can parse baseHref', () {
expect(IndexHtml('<base href="/foo/111/">').getBaseHref(), 'foo/111');
expect(IndexHtml(htmlSample1).getBaseHref(), 'foo/222');
expect(IndexHtml(htmlSample2).getBaseHref(), ''); // Placeholder base href.
});
test('handles missing baseHref', () {
expect(IndexHtml('').getBaseHref(), '');
expect(IndexHtml('<base>').getBaseHref(), '');
expect(IndexHtml(htmlSample3).getBaseHref(), '');
});
test('throws on invalid baseHref', () {
expect(() => IndexHtml('<base href>').getBaseHref(), throwsToolExit());
expect(() => IndexHtml('<base href="">').getBaseHref(), throwsToolExit());
expect(() => IndexHtml('<base href="foo/111">').getBaseHref(), throwsToolExit());
expect(
() => IndexHtml('<base href="foo/111/">').getBaseHref(),
throwsToolExit(),
);
expect(
() => IndexHtml('<base href="/foo/111">').getBaseHref(),
throwsToolExit(),
);
});
test('applies substitutions', () {
final IndexHtml indexHtml = IndexHtml(htmlSample2);
indexHtml.applySubstitutions(
baseHref: '/foo/333/',
serviceWorkerVersion: 'v123xyz',
);
expect(
indexHtml.content,
htmlSample2Replaced(
baseHref: '/foo/333/',
serviceWorkerVersion: 'v123xyz',
),
);
});
test('re-parses after substitutions', () {
final IndexHtml indexHtml = IndexHtml(htmlSample2);
expect(indexHtml.getBaseHref(), ''); // Placeholder base href.
indexHtml.applySubstitutions(
baseHref: '/foo/333/',
serviceWorkerVersion: 'v123xyz',
);
// The parsed base href should be updated after substitutions.
expect(indexHtml.getBaseHref(), 'foo/333');
});
}
| flutter/packages/flutter_tools/test/general.shard/html_utils_test.dart/0 | {'file_path': 'flutter/packages/flutter_tools/test/general.shard/html_utils_test.dart', 'repo_id': 'flutter', 'token_count': 1375} |
// 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 'dart:async';
import 'dart:io';
import 'package:file/file.dart';
import 'package:file/memory.dart';
import 'package:flutter_tools/src/base/context.dart';
import 'package:flutter_tools/src/base/error_handling_io.dart';
import 'package:flutter_tools/src/base/file_system.dart';
import 'package:flutter_tools/src/base/process.dart';
import 'package:flutter_tools/src/globals.dart' as globals;
import '../src/common.dart';
import '../src/testbed.dart';
void main() {
group('Testbed', () {
test('Can provide default interfaces', () async {
final Testbed testbed = Testbed();
late FileSystem localFileSystem;
await testbed.run(() {
localFileSystem = globals.fs;
});
expect(localFileSystem, isA<ErrorHandlingFileSystem>());
expect((localFileSystem as ErrorHandlingFileSystem).fileSystem,
isA<MemoryFileSystem>());
});
test('Can provide setup interfaces', () async {
final Testbed testbed = Testbed(overrides: <Type, Generator>{
A: () => A(),
});
A? instance;
await testbed.run(() {
instance = context.get<A>();
});
expect(instance, isA<A>());
});
test('Can provide local overrides', () async {
final Testbed testbed = Testbed(overrides: <Type, Generator>{
A: () => A(),
});
A? instance;
await testbed.run(() {
instance = context.get<A>();
}, overrides: <Type, Generator>{
A: () => B(),
});
expect(instance, isA<B>());
});
test('provides a mocked http client', () async {
final Testbed testbed = Testbed();
await testbed.run(() async {
final HttpClient client = HttpClient();
final HttpClientRequest request = await client.getUrl(Uri.parse('http://foo.dev'));
final HttpClientResponse response = await request.close();
expect(response.statusCode, HttpStatus.ok);
expect(response.contentLength, 0);
});
});
test('Throws StateError if Timer is left pending', () async {
final Testbed testbed = Testbed();
expect(testbed.run(() async {
Timer.periodic(const Duration(seconds: 1), (Timer timer) { });
}), throwsStateError);
});
test("Doesn't throw a StateError if Timer is left cleaned up", () async {
final Testbed testbed = Testbed();
await testbed.run(() async {
final Timer timer = Timer.periodic(const Duration(seconds: 1), (Timer timer) { });
timer.cancel();
});
});
test('Throws if ProcessUtils is injected',() {
final Testbed testbed = Testbed(overrides: <Type, Generator>{
ProcessUtils: () => null,
});
expect(() => testbed.run(() {}), throwsStateError);
});
});
}
class A { }
class B extends A { }
| flutter/packages/flutter_tools/test/general.shard/testbed_test.dart/0 | {'file_path': 'flutter/packages/flutter_tools/test/general.shard/testbed_test.dart', 'repo_id': 'flutter', 'token_count': 1151} |
// 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 'dart:async';
import 'package:file/file.dart';
import 'package:flutter_tools/src/base/file_system.dart';
import 'package:vm_service/vm_service.dart';
import 'package:vm_service/vm_service_io.dart';
import '../integration.shard/test_data/basic_project.dart';
import '../integration.shard/test_driver.dart';
import '../integration.shard/test_utils.dart';
import '../src/common.dart';
void main() {
late Directory tempDir;
final BasicProjectWithUnaryMain project = BasicProjectWithUnaryMain();
late FlutterRunTestDriver flutter;
group('Clients of flutter run on web with DDS enabled', () {
setUp(() async {
tempDir = createResolvedTempDirectorySync('run_test.');
await project.setUpIn(tempDir);
flutter = FlutterRunTestDriver(tempDir);
});
tearDown(() async {
await flutter.stop();
tryToDelete(tempDir);
});
testWithoutContext('can validate flutter version', () async {
await flutter.run(
withDebugger: true, chrome: true,
additionalCommandArgs: <String>['--verbose', '--web-renderer=html']);
expect(flutter.vmServiceWsUri, isNotNull);
final VmService client =
await vmServiceConnectUri('${flutter.vmServiceWsUri}');
await validateFlutterVersion(client);
});
testWithoutContext('can validate flutter version in parallel', () async {
await flutter.run(
withDebugger: true, chrome: true,
additionalCommandArgs: <String>['--verbose', '--web-renderer=html']);
expect(flutter.vmServiceWsUri, isNotNull);
final VmService client1 =
await vmServiceConnectUri('${flutter.vmServiceWsUri}');
final VmService client2 =
await vmServiceConnectUri('${flutter.vmServiceWsUri}');
await Future.wait(<Future<void>>[
validateFlutterVersion(client1),
validateFlutterVersion(client2),
]);
}, skip: true); // https://github.com/flutter/flutter/issues/99003
});
group('Clients of flutter run on web with DDS disabled', () {
setUp(() async {
tempDir = createResolvedTempDirectorySync('run_test.');
await project.setUpIn(tempDir);
flutter = FlutterRunTestDriver(tempDir, spawnDdsInstance: false);
});
tearDown(() async {
await flutter.stop();
tryToDelete(tempDir);
});
testWithoutContext('can validate flutter version', () async {
await flutter.run(
withDebugger: true, chrome: true,
additionalCommandArgs: <String>['--verbose', '--web-renderer=html']);
expect(flutter.vmServiceWsUri, isNotNull);
final VmService client =
await vmServiceConnectUri('${flutter.vmServiceWsUri}');
await validateFlutterVersion(client);
});
});
}
Future<void> validateFlutterVersion(VmService client) async {
String? method;
final Future<dynamic> registration = expectLater(
client.onEvent('Service'),
emitsThrough(predicate((Event e) {
if (e.kind == EventKind.kServiceRegistered &&
e.service == 'flutterVersion') {
method = e.method;
return true;
}
return false;
}))
);
await client.streamListen('Service');
await registration;
await client.streamCancel('Service');
final dynamic version1 = await client.callServiceExtension(method!);
expect(version1, const TypeMatcher<Success>()
.having((Success r) => r.type, 'type', 'Success')
.having((Success r) => r.json!['frameworkVersion'], 'frameworkVersion', isNotNull));
await client.dispose();
}
| flutter/packages/flutter_tools/test/web.shard/vm_service_web_test.dart/0 | {'file_path': 'flutter/packages/flutter_tools/test/web.shard/vm_service_web_test.dart', 'repo_id': 'flutter', 'token_count': 1359} |
// 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 'dart:convert';
import 'dart:io' show ProcessResult, systemEncoding;
import 'package:fuchsia_remote_debug_protocol/src/runners/ssh_command_runner.dart';
import 'package:process/process.dart';
import 'package:test/fake.dart';
import 'package:test/test.dart';
void main() {
group('SshCommandRunner.constructors', () {
test('throws exception with invalid address', () async {
SshCommandRunner newCommandRunner() {
return SshCommandRunner(address: 'sillyaddress.what');
}
expect(newCommandRunner, throwsArgumentError);
});
test('throws exception from injection constructor with invalid addr', () async {
SshCommandRunner newCommandRunner() {
return SshCommandRunner.withProcessManager(
const LocalProcessManager(),
address: '192.168.1.1.1');
}
expect(newCommandRunner, throwsArgumentError);
});
});
group('SshCommandRunner.run', () {
late FakeProcessManager fakeProcessManager;
late FakeProcessResult fakeProcessResult;
SshCommandRunner runner;
setUp(() {
fakeProcessResult = FakeProcessResult();
fakeProcessManager = FakeProcessManager()..fakeResult = fakeProcessResult;
});
test('verify interface is appended to ipv6 address', () async {
const String ipV6Addr = 'fe80::8eae:4cff:fef4:9247';
const String interface = 'eno1';
runner = SshCommandRunner.withProcessManager(
fakeProcessManager,
address: ipV6Addr,
interface: interface,
sshConfigPath: '/whatever',
);
fakeProcessResult.stdout = 'somestuff';
await runner.run('ls /whatever');
expect(fakeProcessManager.runCommands.single, contains('$ipV6Addr%$interface'));
});
test('verify no percentage symbol is added when no ipv6 interface', () async {
const String ipV6Addr = 'fe80::8eae:4cff:fef4:9247';
runner = SshCommandRunner.withProcessManager(
fakeProcessManager,
address: ipV6Addr,
);
fakeProcessResult.stdout = 'somestuff';
await runner.run('ls /whatever');
expect(fakeProcessManager.runCommands.single, contains(ipV6Addr));
});
test('verify commands are split into multiple lines', () async {
const String addr = '192.168.1.1';
runner = SshCommandRunner.withProcessManager(fakeProcessManager,
address: addr);
fakeProcessResult.stdout = '''
this
has
four
lines''';
final List<String> result = await runner.run('oihaw');
expect(result, hasLength(4));
});
test('verify exception on nonzero process result exit code', () async {
const String addr = '192.168.1.1';
runner = SshCommandRunner.withProcessManager(fakeProcessManager,
address: addr);
fakeProcessResult.stdout = 'whatever';
fakeProcessResult.exitCode = 1;
Future<void> failingFunction() async {
await runner.run('oihaw');
}
expect(failingFunction, throwsA(isA<SshCommandError>()));
});
test('verify correct args with config', () async {
const String addr = 'fe80::8eae:4cff:fef4:9247';
const String config = '/this/that/this/and/uh';
runner = SshCommandRunner.withProcessManager(
fakeProcessManager,
address: addr,
sshConfigPath: config,
);
fakeProcessResult.stdout = 'somestuff';
await runner.run('ls /whatever');
final List<String?> passedCommand = fakeProcessManager.runCommands.single as List<String?>;
expect(passedCommand, contains('-F'));
final int indexOfFlag = passedCommand.indexOf('-F');
final String? passedConfig = passedCommand[indexOfFlag + 1];
expect(passedConfig, config);
});
test('verify config is excluded correctly', () async {
const String addr = 'fe80::8eae:4cff:fef4:9247';
runner = SshCommandRunner.withProcessManager(
fakeProcessManager,
address: addr,
);
fakeProcessResult.stdout = 'somestuff';
await runner.run('ls /whatever');
final List<String?> passedCommand = fakeProcessManager.runCommands.single as List<String?>;
final int indexOfFlag = passedCommand.indexOf('-F');
expect(indexOfFlag, equals(-1));
});
});
}
class FakeProcessManager extends Fake implements ProcessManager {
FakeProcessResult? fakeResult;
List<List<dynamic>> runCommands = <List<dynamic>>[];
@override
Future<ProcessResult> run(List<dynamic> command, {
String? workingDirectory,
Map<String, String>? environment,
bool includeParentEnvironment = true,
bool runInShell = false,
Encoding? stdoutEncoding = systemEncoding,
Encoding? stderrEncoding = systemEncoding,
}) async {
runCommands.add(command);
return fakeResult!;
}
}
class FakeProcessResult extends Fake implements ProcessResult {
@override
int exitCode = 0;
@override
dynamic stdout;
@override
dynamic stderr;
}
| flutter/packages/fuchsia_remote_debug_protocol/test/src/runners/ssh_command_runner_test.dart/0 | {'file_path': 'flutter/packages/fuchsia_remote_debug_protocol/test/src/runners/ssh_command_runner_test.dart', 'repo_id': 'flutter', 'token_count': 1904} |
// 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 'dart:io' show Platform;
import 'package:flutter/material.dart';
// ignore_for_file: public_member_api_docs
void startApp() => runApp(const MyApp());
class MyApp extends StatefulWidget {
const MyApp({super.key});
@override
State<MyApp> createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text('Plugin example app'),
),
body: Center(
child: Text('Platform: ${Platform.operatingSystem}\n'),
),
),
);
}
}
| flutter/packages/integration_test/example/lib/my_app.dart/0 | {'file_path': 'flutter/packages/integration_test/example/lib/my_app.dart', 'repo_id': 'flutter', 'token_count': 294} |
import 'package:flutter/material.dart';
import 'package:flutter_airbnb_ui/constants.dart';
import 'package:flutter_airbnb_ui/listing.dart';
import 'package:flutter_airbnb_ui/pages/listing_page.dart';
import 'package:flutter_airbnb_ui/widgets/book_flip.dart';
import 'package:flutter_airbnb_ui/widgets/listing_info.dart';
class ListingItem extends StatefulWidget {
const ListingItem({
super.key,
required this.listing,
});
final Listing listing;
@override
State<ListingItem> createState() => _ListingItemState();
}
class _ListingItemState extends State<ListingItem>
with SingleTickerProviderStateMixin {
late final AnimationController _animationController;
late final Animation<double> _curvedAnimation;
@override
void initState() {
_animationController = AnimationController(
vsync: this,
duration: const Duration(milliseconds: 300),
);
_curvedAnimation = CurvedAnimation(
parent: _animationController,
curve: Curves.easeInOut,
);
super.initState();
}
@override
void dispose() {
_animationController.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
return Padding(
padding: const EdgeInsets.only(bottom: 20),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
height: 300,
child: GestureDetector(
onTapDown: (_) {
_animationController.animateTo(0.33);
},
onTapUp: (_) {
_animationController.animateTo(0).then((value) {
_openListingPage(context);
});
},
child: Stack(
children: [
Positioned.fill(
child: ClipRRect(
borderRadius: BorderRadius.circular(10),
child: Image.asset(
widget.listing.coverUrl,
fit: BoxFit.cover,
),
),
),
const Positioned(
top: 20,
right: 20,
child: Icon(
Icons.favorite_border_rounded,
color: Colors.white,
size: 30,
),
),
Positioned(
bottom: 25,
left: 25,
right: 0,
child: Hero(
tag: 'listing_hero_${widget.listing.id}',
flightShuttleBuilder: (
BuildContext flightContext,
Animation<double> animation,
HeroFlightDirection flightDirection,
BuildContext fromHeroContext,
BuildContext toHeroContext,
) {
final curvedAnimation = CurvedAnimation(
parent: animation,
curve: Curves.easeInOut,
);
final scaleAnimation = Tween<double>(
begin: Constants.bookInitialScale,
end: 1,
).animate(curvedAnimation);
return ScaleTransition(
scale: scaleAnimation,
alignment: Alignment.bottomLeft,
child: BookFlip(
widget.listing,
animationController: curvedAnimation,
),
);
},
child: Transform.scale(
scale: Constants.bookInitialScale,
alignment: Alignment.bottomLeft,
child: BookFlip(
widget.listing,
animationController: _curvedAnimation,
),
),
),
),
],
),
),
),
const SizedBox(height: 10),
ListingInfo(widget.listing),
],
),
);
}
void _openListingPage(BuildContext context) {
Navigator.of(context).push(
PageRouteBuilder(
transitionDuration: Constants.animationDuration,
reverseTransitionDuration: Constants.animationDuration,
pageBuilder: (BuildContext context, Animation<double> animation, _) {
return ListingPage(widget.listing);
},
transitionsBuilder: (BuildContext context, Animation<double> animation,
_, Widget child) {
final offsetAnimation = Tween<Offset>(
begin: const Offset(0, 1),
end: const Offset(0, 0),
).animate(
CurvedAnimation(
parent: animation,
curve: Curves.easeInOut,
),
);
return SlideTransition(
position: offsetAnimation,
child: child,
);
},
opaque: false,
barrierDismissible: true,
barrierColor: Colors.black.withOpacity(0.5),
),
);
}
}
| flutter_airbnb_ui/lib/widgets/listing_item.dart/0 | {'file_path': 'flutter_airbnb_ui/lib/widgets/listing_item.dart', 'repo_id': 'flutter_airbnb_ui', 'token_count': 2937} |
blank_issues_enabled: false | flutter_and_friends/.github/ISSUE_TEMPLATE/config.yml/0 | {'file_path': 'flutter_and_friends/.github/ISSUE_TEMPLATE/config.yml', 'repo_id': 'flutter_and_friends', 'token_count': 7} |
export 'widgets/widgets.dart';
| flutter_and_friends/lib/location/location.dart/0 | {'file_path': 'flutter_and_friends/lib/location/location.dart', 'repo_id': 'flutter_and_friends', 'token_count': 12} |
import 'package:equatable/equatable.dart';
import 'package:flutter_and_friends/schedule/schedule.dart';
class Schedule extends Equatable {
const Schedule({required this.events});
final List<Event> events;
@override
List<Object> get props => [events];
}
| flutter_and_friends/lib/schedule/models/schedule.dart/0 | {'file_path': 'flutter_and_friends/lib/schedule/models/schedule.dart', 'repo_id': 'flutter_and_friends', 'token_count': 81} |
part of 'settings_cubit.dart';
final class SettingsState extends Equatable {
const SettingsState({
required this.version,
this.patchNumber,
});
final Version version;
final int? patchNumber;
SettingsState copyWith({
Version? version,
int? patchNumber,
}) {
return SettingsState(
version: version ?? this.version,
patchNumber: patchNumber ?? this.patchNumber,
);
}
@override
List<Object?> get props => [version, patchNumber];
}
| flutter_and_friends/lib/settings/cubit/settings_state.dart/0 | {'file_path': 'flutter_and_friends/lib/settings/cubit/settings_state.dart', 'repo_id': 'flutter_and_friends', 'token_count': 162} |
import 'package:flutter/material.dart';
export 'cubit/theme_cubit.dart';
export 'widgets/widgets.dart';
final lightTheme = ThemeData(
appBarTheme: AppBarTheme(
centerTitle: true,
toolbarHeight: kToolbarHeight + 16,
scrolledUnderElevation: 1,
elevation: 1,
shadowColor: _lightColorScheme.secondary,
),
bottomNavigationBarTheme: BottomNavigationBarThemeData(
backgroundColor: _lightColorScheme.surface,
selectedItemColor: _lightColorScheme.primary,
unselectedItemColor: _lightColorScheme.onSurfaceVariant,
showUnselectedLabels: true,
type: BottomNavigationBarType.fixed,
),
colorScheme: _lightColorScheme,
bannerTheme: MaterialBannerThemeData(
backgroundColor: _lightColorScheme.primaryContainer,
),
useMaterial3: true,
);
final darkTheme = ThemeData(
appBarTheme: AppBarTheme(
centerTitle: true,
toolbarHeight: kToolbarHeight + 16,
scrolledUnderElevation: 1,
elevation: 1,
shadowColor: _darkColorScheme.secondary,
),
bottomNavigationBarTheme: BottomNavigationBarThemeData(
backgroundColor: _darkColorScheme.surface,
selectedItemColor: _darkColorScheme.primary,
unselectedItemColor: _darkColorScheme.onSurfaceVariant,
type: BottomNavigationBarType.fixed,
showUnselectedLabels: true,
),
colorScheme: _darkColorScheme,
bannerTheme: MaterialBannerThemeData(
backgroundColor: _darkColorScheme.primaryContainer,
),
useMaterial3: true,
);
const _lightColorScheme = ColorScheme(
brightness: Brightness.light,
primary: Color(0xFF005AC1),
onPrimary: Color(0xFFFFFFFF),
primaryContainer: Color(0xFFD8E2FF),
onPrimaryContainer: Color(0xFF001A41),
secondary: Color(0xFF575E71),
onSecondary: Color(0xFFFFFFFF),
secondaryContainer: Color(0xFFDBE2F9),
onSecondaryContainer: Color(0xFF141B2C),
tertiary: Color(0xFF715573),
onTertiary: Color(0xFFFFFFFF),
tertiaryContainer: Color(0xFFFBD7FC),
onTertiaryContainer: Color(0xFF29132D),
error: Color(0xFFBA1A1A),
errorContainer: Color(0xFFFFDAD6),
onError: Color(0xFFFFFFFF),
onErrorContainer: Color(0xFF410002),
background: Color(0xFFFEFBFF),
onBackground: Color(0xFF1B1B1F),
outline: Color(0xFF74777F),
onInverseSurface: Color(0xFFF2F0F4),
inverseSurface: Color(0xFF303033),
inversePrimary: Color(0xFFADC6FF),
shadow: Color(0xFF000000),
surfaceTint: Color(0xFF005AC1),
outlineVariant: Color(0xFFC4C6D0),
scrim: Color(0xFF000000),
surface: Color(0xFFFAF9FD),
onSurface: Color(0xFF1B1B1F),
surfaceVariant: Color(0xFFE1E2EC),
onSurfaceVariant: Color(0xFF44474F),
);
const _darkColorScheme = ColorScheme(
brightness: Brightness.dark,
primary: Color(0xFFADC6FF),
onPrimary: Color(0xFF002E69),
primaryContainer: Color(0xFF004494),
onPrimaryContainer: Color(0xFFD8E2FF),
secondary: Color(0xFFBFC6DC),
onSecondary: Color(0xFF293041),
secondaryContainer: Color(0xFF3F4759),
onSecondaryContainer: Color(0xFFDBE2F9),
tertiary: Color(0xFFDEBCDF),
onTertiary: Color(0xFF402843),
tertiaryContainer: Color(0xFF583E5B),
onTertiaryContainer: Color(0xFFFBD7FC),
error: Color(0xFFFFB4AB),
errorContainer: Color(0xFF93000A),
onError: Color(0xFF690005),
onErrorContainer: Color(0xFFFFDAD6),
background: Color(0xFF1B1B1F),
onBackground: Color(0xFFE3E2E6),
outline: Color(0xFF8E9099),
onInverseSurface: Color(0xFF1B1B1F),
inverseSurface: Color(0xFFE3E2E6),
inversePrimary: Color(0xFF005AC1),
shadow: Color(0xFF000000),
surfaceTint: Color(0xFFADC6FF),
outlineVariant: Color(0xFF44474F),
scrim: Color(0xFF000000),
surface: Color(0xFF121316),
onSurface: Color(0xFFC7C6CA),
surfaceVariant: Color(0xFF44474F),
onSurfaceVariant: Color(0xFFC4C6D0),
);
| flutter_and_friends/lib/theme/theme.dart/0 | {'file_path': 'flutter_and_friends/lib/theme/theme.dart', 'repo_id': 'flutter_and_friends', 'token_count': 1451} |
name: flutter_and_friends
description: The official Flutter & Friends conference app.
publish_to: none
version: 1.0.0+7
environment:
sdk: ">=3.0.6 <4.0.0"
dependencies:
bloc: ^8.1.2
equatable: ^2.0.5
firebase_core: ^2.15.1
flutter:
sdk: flutter
flutter_bloc: ^8.1.3
font_awesome_flutter:
git:
url: https://github.com/fluttercommunity/font_awesome_flutter
ref: bef4f3f829117241202486f8a0d836e89d167376
hydrated_bloc: ^9.1.2
intl: ^0.18.1
json_annotation: ^4.8.1
path_provider: ^2.1.0
pub_semver: ^2.1.4
pusher_beams: ^1.1.1
restart_app: ^1.2.1
shorebird_code_push: ^1.1.0
url_launcher: ^6.1.12
dev_dependencies:
build_runner: ^2.0.0
flutter_test:
sdk: flutter
json_serializable: ^6.7.1
very_good_analysis: ^5.0.0
flutter:
assets:
- assets/
- assets/activities/
- assets/speakers/
- assets/sponsors/
- shorebird.yaml
uses-material-design: true
| flutter_and_friends/pubspec.yaml/0 | {'file_path': 'flutter_and_friends/pubspec.yaml', 'repo_id': 'flutter_and_friends', 'token_count': 448} |
import 'package:flutter/material.dart';
import 'package:flutter_animations_workshop/pickers/7/color_picker.dart';
class HomePage extends StatelessWidget {
const HomePage({super.key});
@override
Widget build(BuildContext context) {
return const Scaffold(
body: Center(
child: ColorPicker(),
),
);
}
}
| flutter_animations_workshop/lib/pages/home_page.dart/0 | {'file_path': 'flutter_animations_workshop/lib/pages/home_page.dart', 'repo_id': 'flutter_animations_workshop', 'token_count': 126} |
import 'package:flutter/material.dart';
import 'package:flutter_animations_workshop/colors.dart';
import 'package:flutter_animations_workshop/pickers/workshop/color_item.dart';
class ColorPicker extends StatefulWidget {
const ColorPicker({super.key});
@override
State<ColorPicker> createState() => _ColorPickerState();
}
class _ColorPickerState extends State<ColorPicker> {
int _selectedColorIndex = 0;
@override
Widget build(BuildContext context) {
return Container(
padding: const EdgeInsets.all(20),
decoration: BoxDecoration(
color: Colors.white.withOpacity(0.1),
borderRadius: BorderRadius.circular(20),
border: Border.all(color: Colors.white, width: 0.5),
),
child: Wrap(
spacing: 10,
runSpacing: 10,
children: List.generate(
colors.length,
(index) => ColorItem(
onTap: () {
setState(() {
_selectedColorIndex = index;
});
},
isSelected: _selectedColorIndex == index,
color: colors[index],
size: 60,
),
),
),
);
}
}
| flutter_animations_workshop/lib/pickers/workshop/color_picker.dart/0 | {'file_path': 'flutter_animations_workshop/lib/pickers/workshop/color_picker.dart', 'repo_id': 'flutter_animations_workshop', 'token_count': 521} |
// Copyright 2018 The Flutter Architecture Sample Authors. All rights reserved.
// Use of this source code is governed by the MIT license that can be found
// in the LICENSE file.
import 'package:equatable/equatable.dart';
import 'package:bloc_library/models/models.dart';
abstract class FilteredTodosEvent extends Equatable {
const FilteredTodosEvent();
}
class UpdateFilter extends FilteredTodosEvent {
final VisibilityFilter filter;
const UpdateFilter(this.filter);
@override
List<Object> get props => [filter];
@override
String toString() => 'UpdateFilter { filter: $filter }';
}
class UpdateTodos extends FilteredTodosEvent {
final List<Todo> todos;
const UpdateTodos(this.todos);
@override
List<Object> get props => [todos];
@override
String toString() => 'UpdateTodos { todos: $todos }';
}
| flutter_architecture_samples/bloc_library/lib/blocs/filtered_todos/filtered_todos_event.dart/0 | {'file_path': 'flutter_architecture_samples/bloc_library/lib/blocs/filtered_todos/filtered_todos_event.dart', 'repo_id': 'flutter_architecture_samples', 'token_count': 259} |
import 'dart:html';
import 'package:bloc_library/run_app.dart';
import 'package:flutter/cupertino.dart';
import 'package:key_value_store_web/key_value_store_web.dart';
import 'package:todos_repository_local_storage/todos_repository_local_storage.dart';
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
runBlocLibraryApp(LocalStorageRepository(
localStorage: KeyValueStorage(
'bloc_library',
WebKeyValueStore(window.localStorage),
),
));
}
| flutter_architecture_samples/bloc_library/lib/main_web.dart/0 | {'file_path': 'flutter_architecture_samples/bloc_library/lib/main_web.dart', 'repo_id': 'flutter_architecture_samples', 'token_count': 182} |
// Copyright 2018 The Flutter Architecture Sample Authors. All rights reserved.
// Use of this source code is governed by the MIT license that can be found
// in the LICENSE file.
import 'package:flutter/material.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:todos_app_core/todos_app_core.dart';
import 'package:bloc_library/blocs/stats/stats.dart';
import 'package:bloc_library/widgets/widgets.dart';
import 'package:bloc_library/bloc_library_keys.dart';
class Stats extends StatelessWidget {
Stats({Key key}) : super(key: key);
@override
Widget build(BuildContext context) {
final statsBloc = BlocProvider.of<StatsBloc>(context);
return BlocBuilder(
bloc: statsBloc,
builder: (BuildContext context, StatsState state) {
if (state is StatsLoading) {
return LoadingIndicator(key: BlocLibraryKeys.statsLoadingIndicator);
} else if (state is StatsLoaded) {
return Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Padding(
padding: EdgeInsets.only(bottom: 8.0),
child: Text(
ArchSampleLocalizations.of(context).completedTodos,
style: Theme.of(context).textTheme.title,
),
),
Padding(
padding: EdgeInsets.only(bottom: 24.0),
child: Text(
'${state.numCompleted}',
key: ArchSampleKeys.statsNumCompleted,
style: Theme.of(context).textTheme.subhead,
),
),
Padding(
padding: EdgeInsets.only(bottom: 8.0),
child: Text(
ArchSampleLocalizations.of(context).activeTodos,
style: Theme.of(context).textTheme.title,
),
),
Padding(
padding: EdgeInsets.only(bottom: 24.0),
child: Text(
'${state.numActive}',
key: ArchSampleKeys.statsNumActive,
style: Theme.of(context).textTheme.subhead,
),
)
],
),
);
} else {
return Container(key: BlocLibraryKeys.emptyStatsContainer);
}
},
);
}
}
| flutter_architecture_samples/bloc_library/lib/widgets/stats.dart/0 | {'file_path': 'flutter_architecture_samples/bloc_library/lib/widgets/stats.dart', 'repo_id': 'flutter_architecture_samples', 'token_count': 1275} |
// Copyright 2018 The Flutter Architecture Sample Authors. All rights reserved.
// Use of this source code is governed by the MIT license that can be found
// in the LICENSE file.
import 'package:flutter_test/flutter_test.dart';
import 'package:bloc_library/localization.dart';
import 'package:flutter/material.dart';
void main() {
group('FlutterBlocLocalizations', () {
FlutterBlocLocalizations localizations;
FlutterBlocLocalizationsDelegate delegate;
setUp(() {
localizations = FlutterBlocLocalizations();
delegate = FlutterBlocLocalizationsDelegate();
});
test('App Title is correct', () {
expect(localizations.appTitle, 'Bloc Library Example');
});
test('shouldReload returns false', () {
expect(delegate.shouldReload(null), false);
});
test('isSupported returns true for english', () {
expect(delegate.isSupported(Locale('en', 'US')), true);
});
test('isSupported returns false for french', () {
expect(delegate.isSupported(Locale('fr', 'FR')), false);
});
});
}
| flutter_architecture_samples/bloc_library/test/localization_test.dart/0 | {'file_path': 'flutter_architecture_samples/bloc_library/test/localization_test.dart', 'repo_id': 'flutter_architecture_samples', 'token_count': 352} |
// Copyright 2018 The Flutter Architecture Sample Authors. All rights reserved.
// Use of this source code is governed by the MIT license that can be found
// in the LICENSE file.
import 'package:blocs/blocs.dart';
import 'package:mockito/mockito.dart';
import 'package:rxdart/rxdart.dart';
import 'package:test/test.dart';
class MockTodosInteractor extends Mock implements TodosInteractor {}
void main() {
group('StatsBloc', () {
test('should stream the number of active todos', () {
final interactor = MockTodosInteractor();
final todos = [
Todo('Hallo', complete: true),
Todo('Friend'),
];
final source = BehaviorSubject<List<Todo>>.seeded(todos);
when(interactor.todos).thenAnswer((_) => source.stream);
final bloc = StatsBloc(interactor);
expect(bloc.numActive, emits(1));
});
test('should stream the number of completed todos', () {
final interactor = MockTodosInteractor();
final todos = [
Todo('Hallo', complete: true),
Todo('Friend', complete: true),
];
final source = BehaviorSubject<List<Todo>>.seeded(todos);
when(interactor.todos).thenAnswer((_) => source.stream);
final bloc = StatsBloc(interactor);
expect(bloc.numComplete, emits(2));
});
});
}
| flutter_architecture_samples/blocs/test/stats_bloc_test.dart/0 | {'file_path': 'flutter_architecture_samples/blocs/test/stats_bloc_test.dart', 'repo_id': 'flutter_architecture_samples', 'token_count': 488} |
// Copyright 2018 The Flutter Architecture Sample Authors. All rights reserved.
// Use of this source code is governed by the MIT license that can be found
// in the LICENSE file.
import 'dart:async';
import 'package:built_redux_sample/models/models.dart';
/// A class that is meant to represent a Web Service you would call to fetch
/// and persist Todos to and from the cloud.
///
/// Since we're trying to keep this example simple, it doesn't communicate with
/// a real server but simply emulates the functionality.
class WebClient {
final Duration delay;
const WebClient([this.delay = const Duration(milliseconds: 1200)]);
/// Mock that "fetches" some Todos from a "web service" after a short delay
Future<List<Todo>> fetchTodos() async {
return Future.delayed(
delay,
() => [
Todo.builder(
(b) => b
..task = 'Buy food for da kitty'
..note = 'With the chickeny bits!'
..id = '1',
),
Todo.builder(
(b) => b
..task = 'Find a Red Sea dive trip'
..note = 'Echo vs MY Dream'
..id = '2',
),
Todo.builder(
(b) => b
..task = 'Book flights to Egypt'
..complete = true
..id = '3',
),
Todo.builder(
(b) => b
..task = 'Decide on accommodation'
..id = '4',
),
Todo.builder(
(b) => b
..task = 'Sip Margaritas'
..note = 'on the beach'
..complete = true
..id = '5',
),
]);
}
/// Mock that returns true or false for success or failure. In this case,
/// it will "Always Succeed"
Future<bool> postTodos(List<Todo> todos) async {
return Future.value(true);
}
}
| flutter_architecture_samples/built_redux/lib/data/web_client.dart/0 | {'file_path': 'flutter_architecture_samples/built_redux/lib/data/web_client.dart', 'repo_id': 'flutter_architecture_samples', 'token_count': 976} |
// Copyright 2018 The Flutter Architecture Sample Authors. All rights reserved.
// Use of this source code is governed by the MIT license that can be found
// in the LICENSE file.
import 'dart:async';
import 'package:built_redux_sample/data/file_storage.dart';
import 'package:built_redux_sample/data/todos_repository.dart';
import 'package:built_redux_sample/data/web_client.dart';
import 'package:built_redux_sample/models/models.dart';
import 'package:mockito/mockito.dart';
import 'package:test/test.dart';
/// We create two Mocks for our Web Service and File Storage. We will use these
/// mock classes to verify the behavior of the TodosService.
class MockFileStorage extends Mock implements FileStorage {}
class MockWebService extends Mock implements WebClient {}
void main() {
group('TodosRepository', () {
test(
'should load todos from File Storage if they exist without calling the web service',
() {
final fileStorage = MockFileStorage();
final webService = MockWebService();
final todosService = TodosRepository(
fileStorage: fileStorage,
webClient: webService,
);
final todos = [Todo('Task')];
// We'll use our mock throughout the tests to set certain conditions. In
// this first test, we want to mock out our file storage to return a
// list of Todos that we define here in our test!
when(fileStorage.loadTodos()).thenAnswer((_) => Future.value(todos));
expect(todosService.loadTodos(), completion(todos));
verifyNever(webService.fetchTodos());
});
test(
'should fetch todos from the Web Service if the file storage throws a synchronous error',
() async {
final fileStorage = MockFileStorage();
final webService = MockWebService();
final todosService = TodosRepository(
fileStorage: fileStorage,
webClient: webService,
);
final todos = [Todo('Task')];
// In this instance, we'll ask our Mock to throw an error. When it does,
// we expect the web service to be called instead.
when(fileStorage.loadTodos())
.thenAnswer((_) => Future<List<Todo>>.error('Oh no'));
when(webService.fetchTodos()).thenAnswer((_) => Future.value(todos));
// We check that the correct todos were returned, and that the
// webService.fetchTodos method was in fact called!
expect(await todosService.loadTodos(), todos);
verify(webService.fetchTodos());
});
test(
'should fetch todos from the Web Service if the File storage returns an async error',
() async {
final fileStorage = MockFileStorage();
final webService = MockWebService();
final todosService = TodosRepository(
fileStorage: fileStorage,
webClient: webService,
);
final todos = [Todo('Task')];
when(fileStorage.loadTodos())
.thenAnswer((_) => Future<List<Todo>>.error('Oh no'));
when(webService.fetchTodos()).thenAnswer((_) => Future.value(todos));
expect(await todosService.loadTodos(), todos);
verify(webService.fetchTodos());
});
test('should persist the todos to local disk and the web service', () {
final fileStorage = MockFileStorage();
final webService = MockWebService();
final todosService = TodosRepository(
fileStorage: fileStorage,
webClient: webService,
);
final todos = [Todo('Task')];
when(fileStorage.saveTodos(todos)).thenAnswer((_) async => null);
when(webService.postTodos(todos)).thenAnswer((_) async => true);
// In this case, we just want to verify we're correctly persisting to all
// the storage mechanisms we care about.
expect(todosService.saveTodos(todos), completes);
verify(fileStorage.saveTodos(todos));
verify(webService.postTodos(todos));
});
});
}
| flutter_architecture_samples/built_redux/test/todos_repository_test.dart/0 | {'file_path': 'flutter_architecture_samples/built_redux/test/todos_repository_test.dart', 'repo_id': 'flutter_architecture_samples', 'token_count': 1417} |
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:change_notifier_provider_sample/todo_list_model.dart';
import 'package:todos_app_core/todos_app_core.dart';
class EditTodoScreen extends StatefulWidget {
final void Function(String task, String note) onEdit;
final String id;
const EditTodoScreen({
@required this.id,
@required this.onEdit,
}) : super(key: ArchSampleKeys.editTodoScreen);
@override
_EditTodoScreenState createState() => _EditTodoScreenState();
}
class _EditTodoScreenState extends State<EditTodoScreen> {
final _formKey = GlobalKey<FormState>();
TextEditingController _taskController;
TextEditingController _noteController;
@override
void initState() {
final todo =
Provider.of<TodoListModel>(context, listen: false).todoById(widget.id);
_taskController = TextEditingController(text: todo?.task);
_noteController = TextEditingController(text: todo?.note);
super.initState();
}
@override
void dispose() {
_taskController.dispose();
_noteController.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text(ArchSampleLocalizations.of(context).editTodo)),
body: Form(
key: _formKey,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
children: <Widget>[
TextFormField(
controller: _taskController,
key: ArchSampleKeys.taskField,
style: Theme.of(context).textTheme.headline,
decoration: InputDecoration(
hintText: ArchSampleLocalizations.of(context).newTodoHint,
),
validator: (val) {
return val.trim().isEmpty
? ArchSampleLocalizations.of(context).emptyTodoError
: null;
},
),
TextFormField(
controller: _noteController,
key: ArchSampleKeys.noteField,
decoration: InputDecoration(
hintText: ArchSampleLocalizations.of(context).notesHint,
),
maxLines: 10,
)
],
),
),
),
floatingActionButton: FloatingActionButton(
key: ArchSampleKeys.saveTodoFab,
tooltip: ArchSampleLocalizations.of(context).saveChanges,
onPressed: () {
if (_formKey.currentState.validate()) {
_formKey.currentState.save();
widget.onEdit(_taskController.text, _noteController.text);
}
},
child: const Icon(Icons.check),
),
);
}
}
| flutter_architecture_samples/change_notifier_provider/lib/edit_todo_screen.dart/0 | {'file_path': 'flutter_architecture_samples/change_notifier_provider/lib/edit_todo_screen.dart', 'repo_id': 'flutter_architecture_samples', 'token_count': 1250} |
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:todos_app_core/todos_app_core.dart';
import 'package:frideos/frideos.dart';
import 'package:frideos_library/app_state.dart';
class StatsCounter extends StatelessWidget {
@override
Widget build(BuildContext context) {
var bloc = AppStateProvider.of<AppState>(context).statsBloc;
return Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Padding(
padding: EdgeInsets.only(bottom: 8.0),
child: Text(
ArchSampleLocalizations.of(context).completedTodos,
style: Theme.of(context).textTheme.title,
),
),
Padding(
padding: EdgeInsets.only(bottom: 24.0),
child: ValueBuilder<int>(
streamed: bloc.numComplete,
builder: (context, snapshot) => Text(
'${snapshot.data ?? 0}',
key: ArchSampleKeys.statsNumCompleted,
style: Theme.of(context).textTheme.subhead,
),
),
),
Padding(
padding: EdgeInsets.only(bottom: 8.0),
child: Text(
ArchSampleLocalizations.of(context).activeTodos,
style: Theme.of(context).textTheme.title,
),
),
Padding(
padding: EdgeInsets.only(bottom: 24.0),
child: ValueBuilder<int>(
streamed: bloc.numActive,
builder: (context, snapshot) {
return Text(
'${snapshot.data ?? 0}',
key: ArchSampleKeys.statsNumActive,
style: Theme.of(context).textTheme.subhead,
);
},
),
)
],
),
);
}
}
| flutter_architecture_samples/frideos_library/lib/widgets/stats_counter.dart/0 | {'file_path': 'flutter_architecture_samples/frideos_library/lib/widgets/stats_counter.dart', 'repo_id': 'flutter_architecture_samples', 'token_count': 967} |
// Copyright 2018 The Flutter Architecture Sample Authors. All rights reserved.
// Use of this source code is governed by the MIT license that can be found
// in the LICENSE file.
import 'package:flutter/material.dart';
import 'package:todos_app_core/todos_app_core.dart';
import 'package:scoped_model_sample/models.dart';
import 'package:mvc/src/Controller.dart';
class ExtraActionsButton extends StatelessWidget {
ExtraActionsButton({
Key key,
}) : super(key: key);
final con = Con.con;
@override
Widget build(BuildContext context) {
return PopupMenuButton<ExtraAction>(
key: ArchSampleKeys.extraActionsButton,
onSelected: (action) {
if (action == ExtraAction.toggleAllComplete) {
con.toggle();
} else if (action == ExtraAction.clearCompleted) {
/// The View nor the Conttoller need not know what's involved.
con.clear();
}
},
itemBuilder: (BuildContext context) => <PopupMenuItem<ExtraAction>>[
PopupMenuItem<ExtraAction>(
key: ArchSampleKeys.toggleAll,
value: ExtraAction.toggleAllComplete,
child: Text(Con.todos.any((it) => !it['complete'])
? ArchSampleLocalizations.of(context).markAllComplete
: ArchSampleLocalizations.of(context).markAllIncomplete),
),
PopupMenuItem<ExtraAction>(
key: ArchSampleKeys.clearCompleted,
value: ExtraAction.clearCompleted,
child: Text(ArchSampleLocalizations.of(context).clearCompleted),
),
],
);
}
}
| flutter_architecture_samples/mvc/lib/src/widgets/extra_actions_button.dart/0 | {'file_path': 'flutter_architecture_samples/mvc/lib/src/widgets/extra_actions_button.dart', 'repo_id': 'flutter_architecture_samples', 'token_count': 606} |
// Copyright 2018 The Flutter Architecture Sample Authors. All rights reserved.
// Use of this source code is governed by the MIT license that can be found
// in the LICENSE file.
import 'package:meta/meta.dart';
import 'package:todos_repository_core/todos_repository_core.dart';
@immutable
class User {
final String displayName;
User(this.displayName);
UserEntity toEntity() => UserEntity(displayName: displayName);
static User fromEntity(UserEntity entity) => User(entity.displayName);
@override
String toString() {
return 'User{displayName: $displayName}';
}
@override
bool operator ==(Object other) =>
identical(this, other) ||
other is User &&
runtimeType == other.runtimeType &&
displayName == other.displayName;
@override
int get hashCode => displayName.hashCode;
}
| flutter_architecture_samples/mvi_base/lib/src/models/user.dart/0 | {'file_path': 'flutter_architecture_samples/mvi_base/lib/src/models/user.dart', 'repo_id': 'flutter_architecture_samples', 'token_count': 267} |
// Copyright 2018 The Flutter Architecture Sample Authors. All rights reserved.
// Use of this source code is governed by the MIT license that can be found
// in the LICENSE file.
import 'package:flutter/material.dart';
import 'package:mvi_base/mvi_base.dart';
import 'package:mvi_flutter_sample/dependency_injection.dart';
import 'package:mvi_flutter_sample/localization.dart';
import 'package:mvi_flutter_sample/screens/add_edit_screen.dart';
import 'package:mvi_flutter_sample/screens/home_screen.dart';
import 'package:todos_app_core/todos_app_core.dart';
class MviApp extends StatelessWidget {
final TodosInteractor todosRepository;
final UserInteractor userInteractor;
const MviApp({Key key, this.todosRepository, this.userInteractor})
: super(key: key);
@override
Widget build(BuildContext context) {
return Injector(
todosInteractor: todosRepository,
userInteractor: userInteractor,
child: MaterialApp(
onGenerateTitle: (context) => BlocLocalizations.of(context).appTitle,
theme: ArchSampleTheme.theme,
localizationsDelegates: [
ArchSampleLocalizationsDelegate(),
InheritedWidgetLocalizationsDelegate(),
],
routes: {
ArchSampleRoutes.home: (context) {
return HomeScreen();
},
ArchSampleRoutes.addTodo: (context) {
return AddEditScreen(
addTodo: Injector.of(context).todosInteractor.addNewTodo,
);
},
},
),
);
}
}
| flutter_architecture_samples/mvi_flutter/lib/mvi_app.dart/0 | {'file_path': 'flutter_architecture_samples/mvi_flutter/lib/mvi_app.dart', 'repo_id': 'flutter_architecture_samples', 'token_count': 613} |
library details;
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:todos_app_core/todos_app_core.dart';
import 'package:dartea/dartea.dart';
import 'package:mvu/details/types.dart';
import 'package:mvu/common/todo_model.dart';
import 'package:mvu/common/repository_commands.dart';
import 'package:mvu/common/router.dart' as router;
part 'state.dart';
part 'view.dart';
Program<DetailsModel, DetailsMessage, StreamSubscription<RepositoryEvent>>
createProgram(CmdRepository repo, TodoModel todo) => Program(
() => init(todo), (msg, model) => update(repo, msg, model), view,
subscription: (s, d, m) => _repoSubscription(repo, s, d, m));
StreamSubscription<RepositoryEvent> _repoSubscription(
CmdRepository repo,
StreamSubscription<RepositoryEvent> currentSub,
Dispatch<DetailsMessage> dispatch,
DetailsModel model) {
if (currentSub != null) {
return currentSub;
}
final sub = repo.events.listen((event) {
if (event is RepoOnTodoChanged) {
dispatch(OnTodoChanged(event.entity));
}
if (event is RepoOnTodoRemoved) {
dispatch(OnTodoRemoved(event.entity));
}
});
return sub;
}
| flutter_architecture_samples/mvu/lib/details/details.dart/0 | {'file_path': 'flutter_architecture_samples/mvu/lib/details/details.dart', 'repo_id': 'flutter_architecture_samples', 'token_count': 445} |
import 'package:flutter/material.dart';
import 'package:todos_app_core/todos_app_core.dart';
import 'package:mvu/common/router.dart' as router;
import 'package:mvu/home/home.dart' as home;
import 'package:mvu/home/types.dart';
import 'package:mvu/edit/edit.dart' as edit;
import 'localization.dart';
import 'package:mvu/common/repository_commands.dart' show repoCmds;
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
theme: ArchSampleTheme.theme,
localizationsDelegates: [
ArchSampleLocalizationsDelegate(),
MvuLocalizationsDelegate()
],
home: Builder(
builder: (c) {
router.init(c);
return home.createProgram(AppTab.todos).build();
},
),
routes: {
ArchSampleRoutes.addTodo: (_) => edit.createProgram(repoCmds).build()
},
);
}
}
| flutter_architecture_samples/mvu/lib/main.dart/0 | {'file_path': 'flutter_architecture_samples/mvu/lib/main.dart', 'repo_id': 'flutter_architecture_samples', 'token_count': 396} |
import 'package:test/test.dart';
import 'package:mvu/details/details.dart';
import 'package:mvu/details/types.dart';
import 'package:mvu/common/todo_model.dart';
import 'data.dart';
import 'cmd_runner.dart';
void main() {
group('Details screen ->', () {
CmdRunner<DetailsMessage> _cmdRunner;
TestTodosCmdRepository _cmdRepo;
setUp(() {
_cmdRunner = CmdRunner();
_cmdRepo = TestTodosCmdRepository();
});
test('init', () {
var todo = createTodos().map((x) => TodoModel.fromEntity(x)).first;
var model = init(todo).model;
expect(model.todo, equals(todo));
});
test('ToggleCompleted: todo state is changed', () {
var todo = createTodos().map((x) => TodoModel.fromEntity(x)).first;
var model = init(todo).model;
final updResult = update(_cmdRepo, ToggleCompleted(), model);
final updatedModel = updResult.model;
_cmdRunner.run(updResult.effects);
expect(updatedModel.todo.complete, isNot(todo.complete));
expect(
_cmdRepo.createdEffects,
orderedEquals([
predicate<RepoEffect>((x) =>
x is SaveTodoEffect && x.entity == updatedModel.todo.toEntity())
]));
expect(_cmdRunner.producedMessages, isEmpty);
});
test('Remove: model is not changed', () {
var todo = createTodos().map((x) => TodoModel.fromEntity(x)).first;
var model = init(todo).model;
final updateResult = update(_cmdRepo, Remove(), model);
final updatedModel = updateResult.model;
_cmdRunner.run(updateResult.effects);
expect(updatedModel, equals(model));
expect(
_cmdRepo.createdEffects,
orderedEquals([
predicate<RepoEffect>((x) =>
x is RemoveTodoEffect &&
x.entity == updatedModel.todo.toEntity())
]));
expect(_cmdRunner.producedMessages, isEmpty);
});
test('Edit: model is not changed', () {
var todo = createTodos().map((x) => TodoModel.fromEntity(x)).first;
var model = init(todo).model;
var updateResult = update(_cmdRepo, Edit(), model);
expect(updateResult.model, equals(model));
expect(updateResult.effects, isNotEmpty);
});
});
}
| flutter_architecture_samples/mvu/test/details_screen_test.dart/0 | {'file_path': 'flutter_architecture_samples/mvu/test/details_screen_test.dart', 'repo_id': 'flutter_architecture_samples', 'token_count': 933} |
// Copyright 2018 The Flutter Architecture Sample Authors. All rights reserved.
// Use of this source code is governed by the MIT license that can be found
// in the LICENSE file.
import 'package:flutter/foundation.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_redux/flutter_redux.dart';
import 'package:redux/redux.dart';
import 'package:redux_sample/models/models.dart';
import 'package:redux_sample/presentation/stats_counter.dart';
import 'package:redux_sample/selectors/selectors.dart';
class Stats extends StatelessWidget {
Stats({Key key}) : super(key: key);
@override
Widget build(BuildContext context) {
return StoreConnector<AppState, _ViewModel>(
distinct: true,
converter: _ViewModel.fromStore,
builder: (context, vm) {
return StatsCounter(
numActive: vm.numActive,
numCompleted: vm.numCompleted,
);
},
);
}
}
class _ViewModel {
final int numCompleted;
final int numActive;
_ViewModel({@required this.numCompleted, @required this.numActive});
static _ViewModel fromStore(Store<AppState> store) {
return _ViewModel(
numActive: numActiveSelector(todosSelector(store.state)),
numCompleted: numCompletedSelector(todosSelector(store.state)),
);
}
@override
bool operator ==(Object other) =>
identical(this, other) ||
other is _ViewModel &&
runtimeType == other.runtimeType &&
numCompleted == other.numCompleted &&
numActive == other.numActive;
@override
int get hashCode => numCompleted.hashCode ^ numActive.hashCode;
@override
String toString() {
return '_ViewModel{numCompleted: $numCompleted, numActive: $numActive}';
}
}
| flutter_architecture_samples/redux/lib/containers/stats.dart/0 | {'file_path': 'flutter_architecture_samples/redux/lib/containers/stats.dart', 'repo_id': 'flutter_architecture_samples', 'token_count': 608} |
// Copyright 2018 The Flutter Architecture Sample Authors. All rights reserved.
// Use of this source code is governed by the MIT license that can be found
// in the LICENSE file.
import 'package:flutter_test/flutter_test.dart';
import 'package:redux/redux.dart';
import 'package:redux_sample/actions/actions.dart';
import 'package:redux_sample/models/models.dart';
import 'package:redux_sample/reducers/app_state_reducer.dart';
import 'package:redux_sample/selectors/selectors.dart';
void main() {
group('State Reducer', () {
test('should add a todo to the list in response to an AddTodoAction', () {
final store = Store<AppState>(
appReducer,
initialState: AppState.loading(),
);
final todo = Todo('Hallo');
store.dispatch(AddTodoAction(todo));
expect(todosSelector(store.state), [todo]);
});
test('should remove from the list in response to a DeleteTodoAction', () {
final todo = Todo('Hallo');
final store = Store<AppState>(
appReducer,
initialState: AppState(todos: [todo]),
);
expect(todosSelector(store.state), [todo]);
store.dispatch(DeleteTodoAction(todo.id));
expect(todosSelector(store.state), []);
});
test('should update a todo in response to an UpdateTodoAction', () {
final todo = Todo('Hallo');
final updatedTodo = todo.copyWith(task: 'Tschüss');
final store = Store<AppState>(
appReducer,
initialState: AppState(todos: [todo]),
);
store.dispatch(UpdateTodoAction(todo.id, updatedTodo));
expect(todosSelector(store.state), [updatedTodo]);
});
test('should clear completed todos', () {
final todo1 = Todo('Hallo');
final todo2 = Todo('Tschüss', complete: true);
final store = Store<AppState>(
appReducer,
initialState: AppState(todos: [todo1, todo2]),
);
expect(todosSelector(store.state), [todo1, todo2]);
store.dispatch(ClearCompletedAction());
expect(todosSelector(store.state), [todo1]);
});
test('should mark all as completed if some todos are incomplete', () {
final todo1 = Todo('Hallo');
final todo2 = Todo('Tschüss', complete: true);
final store = Store<AppState>(
appReducer,
initialState: AppState(todos: [todo1, todo2]),
);
expect(todosSelector(store.state), [todo1, todo2]);
store.dispatch(ToggleAllAction());
expect(allCompleteSelector(todosSelector(store.state)), isTrue);
});
test('should mark all as incomplete if all todos are complete', () {
final todo1 = Todo('Hallo', complete: true);
final todo2 = Todo('Tschüss', complete: true);
final store = Store<AppState>(
appReducer,
initialState: AppState(todos: [todo1, todo2]),
);
expect(todosSelector(store.state), [todo1, todo2]);
store.dispatch(ToggleAllAction());
expect(allCompleteSelector(todosSelector(store.state)), isFalse);
});
test('should update the VisibilityFilter', () {
final store = Store<AppState>(
appReducer,
initialState: AppState(activeFilter: VisibilityFilter.active),
);
store.dispatch(UpdateFilterAction(VisibilityFilter.completed));
expect(store.state.activeFilter, VisibilityFilter.completed);
});
test('should update the AppTab', () {
final store = Store<AppState>(
appReducer,
initialState: AppState(activeTab: AppTab.todos),
);
store.dispatch(UpdateTabAction(AppTab.stats));
expect(store.state.activeTab, AppTab.stats);
});
});
}
| flutter_architecture_samples/redux/test/reducer_test.dart/0 | {'file_path': 'flutter_architecture_samples/redux/test/reducer_test.dart', 'repo_id': 'flutter_architecture_samples', 'token_count': 1451} |
// Copyright 2018 The Flutter Architecture Sample Authors. All rights reserved.
// Use of this source code is governed by the MIT license that can be found
// in the LICENSE file.
import 'dart:async';
import 'package:simple_blocs/src/models/models.dart';
import 'package:simple_blocs/src/todos_interactor.dart';
class StatsBloc {
final TodosInteractor _interactor;
StatsBloc(TodosInteractor interactor) : _interactor = interactor;
// Outputs
Stream<int> get numActive => _interactor.todos.map((List<Todo> todos) =>
todos.fold(0, (sum, todo) => !todo.complete ? ++sum : sum));
Stream<int> get numComplete => _interactor.todos.map((List<Todo> todos) =>
todos.fold(0, (sum, todo) => todo.complete ? ++sum : sum));
}
| flutter_architecture_samples/simple_blocs/lib/src/stats_bloc.dart/0 | {'file_path': 'flutter_architecture_samples/simple_blocs/lib/src/stats_bloc.dart', 'repo_id': 'flutter_architecture_samples', 'token_count': 261} |
import 'package:states_rebuilder_sample/domain/exceptions/validation_exception.dart';
import 'package:states_rebuilder_sample/service/exceptions/persistance_exception.dart';
class ErrorHandler {
static String getErrorMessage(dynamic error) {
if (error is ValidationException) {
return error.message;
}
if (error is PersistanceException) {
return error.message;
}
throw (error);
}
}
| flutter_architecture_samples/states_rebuilder/lib/ui/exceptions/error_handler.dart/0 | {'file_path': 'flutter_architecture_samples/states_rebuilder/lib/ui/exceptions/error_handler.dart', 'repo_id': 'flutter_architecture_samples', 'token_count': 142} |
// Copyright 2018 The Flutter Architecture Sample Authors. All rights reserved.
// Use of this source code is governed by the MIT license that can be found
// in the LICENSE file.
class UserEntity {
final String id;
final String displayName;
final String photoUrl;
UserEntity({this.id, this.displayName, this.photoUrl});
@override
bool operator ==(Object other) =>
identical(this, other) ||
other is UserEntity &&
runtimeType == other.runtimeType &&
id == other.id &&
displayName == other.displayName &&
photoUrl == other.photoUrl;
@override
int get hashCode => id.hashCode ^ displayName.hashCode ^ photoUrl.hashCode;
@override
String toString() {
return 'UserEntity{id: $id, displayName: $displayName, photoUrl: $photoUrl}';
}
}
| flutter_architecture_samples/todos_repository_core/lib/src/user_entity.dart/0 | {'file_path': 'flutter_architecture_samples/todos_repository_core/lib/src/user_entity.dart', 'repo_id': 'flutter_architecture_samples', 'token_count': 269} |
// Copyright 2018 The Flutter Architecture Sample Authors. All rights reserved.
// Use of this source code is governed by the MIT license that can be found
// in the LICENSE file.
import 'dart:async';
import 'package:mockito/mockito.dart';
import 'package:test/test.dart';
import 'package:todos_repository_core/todos_repository_core.dart';
import 'package:todos_repository_local_storage/todos_repository_local_storage.dart';
class MockTodosRepository extends Mock implements TodosRepository {}
void main() {
group('ReactiveTodosRepository', () {
List<TodoEntity> createTodos([String task = 'Task']) {
return [
TodoEntity(task, '1', 'Hallo', false),
TodoEntity(task, '2', 'Friend', false),
TodoEntity(task, '3', 'Yo', false),
];
}
test('should load todos from the base repo and send them to the client',
() {
final todos = createTodos();
final repository = MockTodosRepository();
final reactiveRepository = ReactiveLocalStorageRepository(
repository: repository,
seedValue: todos,
);
when(repository.loadTodos())
.thenAnswer((_) => Future.value(<TodoEntity>[]));
expect(reactiveRepository.todos(), emits(todos));
});
test('should only load from the base repo once', () {
final todos = createTodos();
final repository = MockTodosRepository();
final reactiveRepository = ReactiveLocalStorageRepository(
repository: repository,
seedValue: todos,
);
when(repository.loadTodos()).thenAnswer((_) => Future.value(todos));
expect(reactiveRepository.todos(), emits(todos));
expect(reactiveRepository.todos(), emits(todos));
verify(repository.loadTodos()).called(1);
});
test('should add todos to the repository and emit the change', () async {
final todos = createTodos();
final repository = MockTodosRepository();
final reactiveRepository = ReactiveLocalStorageRepository(
repository: repository,
seedValue: [],
);
when(repository.loadTodos())
.thenAnswer((_) => Future.value(<TodoEntity>[]));
when(repository.saveTodos(todos)).thenAnswer((_) => Future.value());
await reactiveRepository.addNewTodo(todos.first);
verify(repository.saveTodos(any));
expect(reactiveRepository.todos(), emits([todos.first]));
});
test('should update a todo in the repository and emit the change',
() async {
final todos = createTodos();
final repository = MockTodosRepository();
final reactiveRepository = ReactiveLocalStorageRepository(
repository: repository,
seedValue: todos,
);
final update = createTodos('task');
when(repository.loadTodos()).thenAnswer((_) => Future.value(todos));
when(repository.saveTodos(any)).thenAnswer((_) => Future.value());
await reactiveRepository.updateTodo(update.first);
verify(repository.saveTodos(any));
expect(
reactiveRepository.todos(),
emits([update[0], todos[1], todos[2]]),
);
});
test('should remove todos from the repo and emit the change', () async {
final repository = MockTodosRepository();
final todos = createTodos();
final reactiveRepository = ReactiveLocalStorageRepository(
repository: repository,
seedValue: todos,
);
final future = Future.value(todos);
when(repository.loadTodos()).thenAnswer((_) => future);
when(repository.saveTodos(any)).thenAnswer((_) => Future.value());
await reactiveRepository.deleteTodo([todos.first.id, todos.last.id]);
verify(repository.saveTodos(any));
expect(reactiveRepository.todos(), emits([todos[1]]));
});
});
}
| flutter_architecture_samples/todos_repository_local_storage/test/reactive_repository_test.dart/0 | {'file_path': 'flutter_architecture_samples/todos_repository_local_storage/test/reactive_repository_test.dart', 'repo_id': 'flutter_architecture_samples', 'token_count': 1475} |
// Copyright 2018 The Flutter Architecture Sample Authors. All rights reserved.
// Use of this source code is governed by the MIT license that can be found
// in the LICENSE file.
import 'dart:async';
import 'package:flutter/material.dart';
class VanillaLocalizations {
static VanillaLocalizations of(BuildContext context) {
return Localizations.of<VanillaLocalizations>(
context, VanillaLocalizations);
}
String get appTitle => 'Vanilla Example';
}
class VanillaLocalizationsDelegate
extends LocalizationsDelegate<VanillaLocalizations> {
@override
Future<VanillaLocalizations> load(Locale locale) =>
Future(() => VanillaLocalizations());
@override
bool shouldReload(VanillaLocalizationsDelegate old) => false;
@override
bool isSupported(Locale locale) =>
locale.languageCode.toLowerCase().contains('en');
}
| flutter_architecture_samples/vanilla/lib/localization.dart/0 | {'file_path': 'flutter_architecture_samples/vanilla/lib/localization.dart', 'repo_id': 'flutter_architecture_samples', 'token_count': 250} |
import 'package:flutter/material.dart';
import 'package:flutter_articles/presentation/article/widgets/articles_list.dart';
import 'package:flutter_articles/models/article.dart';
import 'package:flutter_articles/presentation/shared/app_bar_flutter_logo.dart';
import 'package:flutter_articles/presentation/shared/http_page_wrapper.dart';
import 'package:flutter_articles/repositories/article_repository.dart';
import 'package:provider/provider.dart';
class HomePage extends StatelessWidget {
const HomePage({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
HttpArticleRepository articleRepository =
Provider.of<HttpArticleRepository>(context, listen: false);
return Scaffold(
appBar: AppBar(
title: const Text('Flutter Articles'),
actions: const [AppBarFlutterLogo()],
),
body: HttpPageWrapper<List<Article>>(
dataRequest: (bool forceRefresh) async {
return await articleRepository.getArticles(
tags: ['flutter', 'dart'],
forceRefresh: forceRefresh,
);
},
contentBuilder: (BuildContext context, List<Article> articles) {
return ArticlesList(articles);
},
),
);
}
}
| flutter_articles/lib/presentation/home/pages/home_page.dart/0 | {'file_path': 'flutter_articles/lib/presentation/home/pages/home_page.dart', 'repo_id': 'flutter_articles', 'token_count': 475} |
import 'package:flutter/material.dart';
import 'package:flutter_card_swiper/src/constants.dart';
class SwiperCard {
final int order;
final double scale;
final double yOffset;
final Widget child;
final int totalCount;
const SwiperCard({
required this.order,
required this.child,
required this.totalCount,
}) : scale = 1 - (order * Constants.scaleFraction),
yOffset = order * Constants.yOffset;
static List<SwiperCard> listFromWidgets(List<Widget> children) {
return List.generate(
children.length,
(i) => SwiperCard(
order: i,
child: children[i],
totalCount: children.length,
),
).reversed.toList();
}
}
| flutter_cool_card_swiper/lib/src/models/swiper_card.dart/0 | {'file_path': 'flutter_cool_card_swiper/lib/src/models/swiper_card.dart', 'repo_id': 'flutter_cool_card_swiper', 'token_count': 268} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.