Flutter Gallery is a resource to help developers evaluate and use Flutter. It is a collection of Material Design & Cupertino widgets, behaviors, and vignettes implemented with Flutter. We often get asked how one can see Flutter in action, and this gallery demonstrates what Flutter provides and how it behaves in the wild.
The Flutter Gallery targets Flutter's master channel. As such, it can take advantage of new SDK features that haven't landed in the stable channel.
If you'd like to run the Flutter Gallery, make sure to switch to the master channel first:
flutter channel master
flutter upgradeWhen you're done, use this command to return to the safety of the stable channel:
flutter channel stable
flutter upgradeFlutter Gallery has been built to support multiple platforms. This includes:
- Android
- iOS
- web
- macOS
- Linux
- Windows
An APK, macOS, Linux, and Windows builds are available for download. You can find it on the web at gallery.flutter.dev and on the Google Play Store.
You can build from source yourself for any of these platforms, though, please note desktop support must be enabled. For example, to run the app on Windows:
cd gallery/
flutter config --enable-windows-desktop
flutter create .
flutter run -d windowsAdditionally, the UI adapts between mobile and desktop layouts regardless of the platform it runs on. This is determined based on window size as outlined in adaptive.dart.
-
Convert your animation to a
.giffile. Ideally, use a background color of0xFF030303to ensure the animation blends into the background of the app. -
Add your new
.giffile to the assets directory underassets/splash_effects. Ensure the name follows the formatsplash_effect_$num.gif. The number should be the next number after the current largest number in the repository. -
Update the map
_effectDurationsin splash.dart to include the number of the new.gifas well as its estimated duration. The duration is used to determine how long to display the splash animation at launch.
To generate localized strings or highlighted code segments, make sure that you have grinder installed by running
flutter pub getTo generate localized strings (see separate README for more details):
flutter pub run grinder l10nTo generate code segments (see separate README for more details):
flutter pub run grinder update-code-segments-
Bump the version number up in the
pubspec.yaml. Use semantic versioning to determine which number to increment. For example2.2.0+020200should become2.3.0+020300. -
Create a tag on the
masterbranch of this repo in the form ofv2.3.git tag v2.3git push --tags
-
Publish the GH pages web release (using the peanut package).
flutter pub global activate peanutflutter pub global run peanut:peanutgit push upstream gh-pages:gh-pagesgit update-ref refs/heads/gh-pages upstream/gh-pagesif you need to align with upstream.
- This step can be removed once fully migrated to firebase hosting.
-
Publish the firebase hosted web release.
- Log in to the account that has write access to
gallery-flutter-devwithfirebase login flutter web buildfirebase deploy
- Log in to the account that has write access to
-
Publish the Android release (using the correct signing certificates).
- Create the app bundle with
flutter build appbundle. - Upload to the Play store console.
- Publish the Play store release.
- Create the APK with
flutter build apk(this is for the Github release).
- Create the app bundle with
-
Draft a release in Github from the tag you created, call the release
Flutter Gallery 2.x- Upload the Android APK from above.
- Create and upload the macOS build by running
flutter build macosand zipping the app insidebuild/macos/Build/Products/Release. - Optional: Create and upload the Linux/Windows builds.
- Publish the release.
