We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
As stated above.
Below is my main.dart.
import 'package:flutter/material.dart'; final dir = Directory('../assets'); String fileListString = ''; Future<void> main() async { List<FileSystemEntity> fileList = await dir.list().toList(); fileListString = fileList.map((e) => e.path).join(','); 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 Container( color: Colors.white, child: Column( mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[ AnimatedSwitcher( duration: const Duration(milliseconds: 500), transitionBuilder: (Widget child, Animation<double> animation) { return RotationTransition(turns: animation, child: child); }, switchOutCurve: Curves.easeInOutCubic, switchInCurve: Curves.easeInOutCubic, child: Text( '$_count', // This key causes the AnimatedSwitcher to interpret this as a "new" // child each time the count changes, so that it will begin its animation // when the count changes. key: ValueKey<int>(_count), style: Theme.of(context).textTheme.headline4, ), ), ElevatedButton( child: const Text('Increment'), onPressed: () { setState(() { _count += 1; }); }, ), Text(fileListString) ], ), ); } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
As stated above.
Below is my main.dart.
The text was updated successfully, but these errors were encountered: