
Related to [Update both `ProgressIndicator` for Material 3 redesign](https://github.com/flutter/flutter/issues/141340) ### Code sample <details> <summary>expand to view the code sample</summary> ```dart import 'package:flutter/material.dart'; void main() => runApp(const MyApp()); class MyApp extends StatefulWidget { const MyApp({super.key}); @override State<MyApp> createState() => _MyAppState(); } class _MyAppState extends State<MyApp> { bool isRTL = false; @override Widget build(BuildContext context) { return MaterialApp( debugShowCheckedModeBanner: false, home: Scaffold( body: Directionality( textDirection: isRTL ? TextDirection.rtl : TextDirection.ltr, child: Center( child: Column( spacing: 2.0, mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[ const Text('Default LinearProgressIndicator'), const Padding( padding: EdgeInsets.all(16.0), child: LinearProgressIndicator( value: 0.45, ), ), const Text('Default indefinite LinearProgressIndicator'), const Padding( padding: EdgeInsets.all(16.0), child: LinearProgressIndicator(), ), const Text('Updated height and border radius'), Padding( padding: const EdgeInsets.all(16.0), child: LinearProgressIndicator( value: 0.25, minHeight: 16.0, borderRadius: BorderRadius.circular(16.0), ), ), const Text('Updated stop indicator color and radius'), Padding( padding: const EdgeInsets.all(16.0), child: LinearProgressIndicator( value: 0.74, minHeight: 16.0, borderRadius: BorderRadius.circular(16.0), stopIndicatorColor: Theme.of(context).colorScheme.error, stopIndicatorRadius: 32.0, ), ), const Text('Track gap and stop indicator radius set to 0'), Padding( padding: const EdgeInsets.all(16.0), child: LinearProgressIndicator( value: 0.50, minHeight: 16.0, borderRadius: BorderRadius.circular(16.0), trackGap: 0, stopIndicatorRadius: 0, ), ), ], ), ), ), floatingActionButton: FloatingActionButton.extended( onPressed: () { setState(() { isRTL = !isRTL; }); }, label: const Text('Toggle Direction'), ), ), ); } } ``` </details> ### Preview <img width="824" alt="Screenshot 2024-09-09 at 13 53 10" src="https://github.com/user-attachments/assets/d12e56a5-f196-4011-8266-c7ab96be96b2">
Flutter Examples
This directory contains several examples of using Flutter. To run an example,
use flutter run
inside that example's directory. See the getting started
guide to install the flutter
tool.
For additional samples, see the
flutter/samples
repo.
Available examples include:
-
Hello, world The hello world app is a minimal Flutter app that shows the text "Hello, world!"
-
Flutter gallery The flutter gallery app no longer lives in this repo. Please see the gallery repo.
-
Layers The layers vignettes show how to use the various layers in the Flutter framework. For details, see the layers README.
-
Platform Channel The platform channel app demonstrates how to connect a Flutter app to platform-specific APIs. For documentation, see https://flutter.dev/to/platform-channels/.
-
Platform Channel Swift The platform channel swift app is the same as platform channel but the iOS version is in Swift and there is no Android version.
Notes
Note on Gradle wrapper files in .gitignore
:
Gradle wrapper files should normally be checked into source control. The example projects don't do that to avoid having several copies of the wrapper binary in the Flutter repo. Instead, the Gradle wrapper is injected by Flutter tooling, and the wrapper files are .gitignore'd to avoid making the Flutter repository dirty as a side effect of running the examples.