@@ -2,37 +2,34 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// Flutter code sample for [AnimatedAlign].
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
void main() => runApp(const MyApp());
|
||||
/// Flutter code sample for [AnimatedAlign].
|
||||
|
||||
class MyApp extends StatelessWidget {
|
||||
const MyApp({super.key});
|
||||
void main() => runApp(const AnimatedAlignExampleApp());
|
||||
|
||||
static const String _title = 'Flutter Code Sample';
|
||||
class AnimatedAlignExampleApp extends StatelessWidget {
|
||||
const AnimatedAlignExampleApp({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
title: _title,
|
||||
home: Scaffold(
|
||||
appBar: AppBar(title: const Text(_title)),
|
||||
body: const MyStatefulWidget(),
|
||||
appBar: AppBar(title: const Text('AnimatedAlign Sample')),
|
||||
body: const AnimatedAlignExample(),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class MyStatefulWidget extends StatefulWidget {
|
||||
const MyStatefulWidget({super.key});
|
||||
class AnimatedAlignExample extends StatefulWidget {
|
||||
const AnimatedAlignExample({super.key});
|
||||
|
||||
@override
|
||||
State<MyStatefulWidget> createState() => _MyStatefulWidgetState();
|
||||
State<AnimatedAlignExample> createState() => _AnimatedAlignExampleState();
|
||||
}
|
||||
|
||||
class _MyStatefulWidgetState extends State<MyStatefulWidget> {
|
||||
class _AnimatedAlignExampleState extends State<AnimatedAlignExample> {
|
||||
bool selected = false;
|
||||
|
||||
@override
|
||||
|
||||
@@ -2,37 +2,34 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// Flutter code sample for [AnimatedContainer].
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
void main() => runApp(const MyApp());
|
||||
/// Flutter code sample for [AnimatedContainer].
|
||||
|
||||
class MyApp extends StatelessWidget {
|
||||
const MyApp({super.key});
|
||||
void main() => runApp(const AnimatedContainerExampleApp());
|
||||
|
||||
static const String _title = 'Flutter Code Sample';
|
||||
class AnimatedContainerExampleApp extends StatelessWidget {
|
||||
const AnimatedContainerExampleApp({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
title: _title,
|
||||
home: Scaffold(
|
||||
appBar: AppBar(title: const Text(_title)),
|
||||
body: const MyStatefulWidget(),
|
||||
appBar: AppBar(title: const Text('AnimatedContainer Sample')),
|
||||
body: const AnimatedContainerExample(),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class MyStatefulWidget extends StatefulWidget {
|
||||
const MyStatefulWidget({super.key});
|
||||
class AnimatedContainerExample extends StatefulWidget {
|
||||
const AnimatedContainerExample({super.key});
|
||||
|
||||
@override
|
||||
State<MyStatefulWidget> createState() => _MyStatefulWidgetState();
|
||||
State<AnimatedContainerExample> createState() => _AnimatedContainerExampleState();
|
||||
}
|
||||
|
||||
class _MyStatefulWidgetState extends State<MyStatefulWidget> {
|
||||
class _AnimatedContainerExampleState extends State<AnimatedContainerExample> {
|
||||
bool selected = false;
|
||||
|
||||
@override
|
||||
@@ -48,8 +45,7 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
|
||||
width: selected ? 200.0 : 100.0,
|
||||
height: selected ? 100.0 : 200.0,
|
||||
color: selected ? Colors.red : Colors.blue,
|
||||
alignment:
|
||||
selected ? Alignment.center : AlignmentDirectional.topCenter,
|
||||
alignment: selected ? Alignment.center : AlignmentDirectional.topCenter,
|
||||
duration: const Duration(seconds: 2),
|
||||
curve: Curves.fastOutSlowIn,
|
||||
child: const FlutterLogo(size: 75),
|
||||
|
||||
@@ -2,37 +2,34 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// Flutter code sample for [AnimatedFractionallySizedBox].
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
void main() => runApp(const MyApp());
|
||||
/// Flutter code sample for [AnimatedFractionallySizedBox].
|
||||
|
||||
class MyApp extends StatelessWidget {
|
||||
const MyApp({super.key});
|
||||
void main() => runApp(const AnimatedFractionallySizedBoxExampleApp());
|
||||
|
||||
static const String _title = 'Flutter Code Sample';
|
||||
class AnimatedFractionallySizedBoxExampleApp extends StatelessWidget {
|
||||
const AnimatedFractionallySizedBoxExampleApp({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
title: _title,
|
||||
home: Scaffold(
|
||||
appBar: AppBar(title: const Text(_title)),
|
||||
body: const MyStatefulWidget(),
|
||||
appBar: AppBar(title: const Text('AnimatedFractionallySizedBox Sample')),
|
||||
body: const AnimatedFractionallySizedBoxExample(),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class MyStatefulWidget extends StatefulWidget {
|
||||
const MyStatefulWidget({super.key});
|
||||
class AnimatedFractionallySizedBoxExample extends StatefulWidget {
|
||||
const AnimatedFractionallySizedBoxExample({super.key});
|
||||
|
||||
@override
|
||||
State<MyStatefulWidget> createState() => _MyStatefulWidgetState();
|
||||
State<AnimatedFractionallySizedBoxExample> createState() => _AnimatedFractionallySizedBoxExampleState();
|
||||
}
|
||||
|
||||
class _MyStatefulWidgetState extends State<MyStatefulWidget> {
|
||||
class _AnimatedFractionallySizedBoxExampleState extends State<AnimatedFractionallySizedBoxExample> {
|
||||
bool selected = false;
|
||||
|
||||
@override
|
||||
|
||||
@@ -2,37 +2,34 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// Flutter code sample for [AnimatedPadding].
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
void main() => runApp(const MyApp());
|
||||
/// Flutter code sample for [AnimatedPadding].
|
||||
|
||||
class MyApp extends StatelessWidget {
|
||||
const MyApp({super.key});
|
||||
void main() => runApp(const AnimatedPaddingExampleApp());
|
||||
|
||||
static const String _title = 'Flutter Code Sample';
|
||||
class AnimatedPaddingExampleApp extends StatelessWidget {
|
||||
const AnimatedPaddingExampleApp({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
title: _title,
|
||||
home: Scaffold(
|
||||
appBar: AppBar(title: const Text(_title)),
|
||||
body: const MyStatefulWidget(),
|
||||
appBar: AppBar(title: const Text('AnimatedPadding Sample')),
|
||||
body: const AnimatedPaddingExample(),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class MyStatefulWidget extends StatefulWidget {
|
||||
const MyStatefulWidget({super.key});
|
||||
class AnimatedPaddingExample extends StatefulWidget {
|
||||
const AnimatedPaddingExample({super.key});
|
||||
|
||||
@override
|
||||
State<MyStatefulWidget> createState() => _MyStatefulWidgetState();
|
||||
State<AnimatedPaddingExample> createState() => _AnimatedPaddingExampleState();
|
||||
}
|
||||
|
||||
class _MyStatefulWidgetState extends State<MyStatefulWidget> {
|
||||
class _AnimatedPaddingExampleState extends State<AnimatedPaddingExample> {
|
||||
double padValue = 0.0;
|
||||
void _updatePadding(double value) {
|
||||
setState(() {
|
||||
|
||||
@@ -2,39 +2,36 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// Flutter code sample for [AnimatedPositioned].
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
void main() => runApp(const MyApp());
|
||||
/// Flutter code sample for [AnimatedPositioned].
|
||||
|
||||
class MyApp extends StatelessWidget {
|
||||
const MyApp({super.key});
|
||||
void main() => runApp(const AnimatedPositionedExampleApp());
|
||||
|
||||
static const String _title = 'Flutter Code Sample';
|
||||
class AnimatedPositionedExampleApp extends StatelessWidget {
|
||||
const AnimatedPositionedExampleApp({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
title: _title,
|
||||
home: Scaffold(
|
||||
appBar: AppBar(title: const Text(_title)),
|
||||
appBar: AppBar(title: const Text('AnimatedPositioned Sample')),
|
||||
body: const Center(
|
||||
child: MyStatefulWidget(),
|
||||
child: AnimatedPositionedExample(),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class MyStatefulWidget extends StatefulWidget {
|
||||
const MyStatefulWidget({super.key});
|
||||
class AnimatedPositionedExample extends StatefulWidget {
|
||||
const AnimatedPositionedExample({super.key});
|
||||
|
||||
@override
|
||||
State<MyStatefulWidget> createState() => _MyStatefulWidgetState();
|
||||
State<AnimatedPositionedExample> createState() => _AnimatedPositionedExampleState();
|
||||
}
|
||||
|
||||
class _MyStatefulWidgetState extends State<MyStatefulWidget> {
|
||||
class _AnimatedPositionedExampleState extends State<AnimatedPositionedExample> {
|
||||
bool selected = false;
|
||||
|
||||
@override
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// Flutter code sample for [AnimatedSlide].
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
/// Flutter code sample for [AnimatedSlide].
|
||||
|
||||
void main() => runApp(const AnimatedSlideApp());
|
||||
|
||||
class AnimatedSlideApp extends StatelessWidget {
|
||||
|
||||
@@ -2,39 +2,36 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// Flutter code sample for [SliverAnimatedOpacity].
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
void main() => runApp(const MyApp());
|
||||
/// Flutter code sample for [SliverAnimatedOpacity].
|
||||
|
||||
class MyApp extends StatelessWidget {
|
||||
const MyApp({super.key});
|
||||
void main() => runApp(const SliverAnimatedOpacityExampleApp());
|
||||
|
||||
static const String _title = 'Flutter Code Sample';
|
||||
class SliverAnimatedOpacityExampleApp extends StatelessWidget {
|
||||
const SliverAnimatedOpacityExampleApp({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
title: _title,
|
||||
home: Scaffold(
|
||||
appBar: AppBar(title: const Text(_title)),
|
||||
appBar: AppBar(title: const Text('SliverAnimatedOpacity Sample')),
|
||||
body: const Center(
|
||||
child: MyStatefulWidget(),
|
||||
child: SliverAnimatedOpacityExample(),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class MyStatefulWidget extends StatefulWidget {
|
||||
const MyStatefulWidget({super.key});
|
||||
class SliverAnimatedOpacityExample extends StatefulWidget {
|
||||
const SliverAnimatedOpacityExample({super.key});
|
||||
|
||||
@override
|
||||
State<MyStatefulWidget> createState() => _MyStatefulWidgetState();
|
||||
State<SliverAnimatedOpacityExample> createState() => _SliverAnimatedOpacityExampleState();
|
||||
}
|
||||
|
||||
class _MyStatefulWidgetState extends State<MyStatefulWidget>
|
||||
class _SliverAnimatedOpacityExampleState extends State<SliverAnimatedOpacityExample>
|
||||
with SingleTickerProviderStateMixin {
|
||||
bool _visible = true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user