• Stars
    star
    5,866
  • Rank 6,905 (Top 0.2 %)
  • Language
    Dart
  • License
    BSD 3-Clause "New...
  • Created over 4 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Flutter Gallery is a resource to help developers evaluate and use Flutter

Flutter Gallery

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.

Flutter Gallery

Features

  • Showcase for material, cupertino, and other widgets
  • Adaptive layout for mobile and desktop
  • State restoration support
  • Settings to text scaling, text direction, locale, theme, and more...
  • Demo for animations
  • Foldable support and demo for dual_screen
  • Deferred loading
  • CI/CD
  • ...and much more!

Supported Platforms

Flutter Gallery has been built to support multiple platforms. These include:

Running

One can run the gallery locally for any of these platforms. For desktop platforms, please see the Flutter docs for the latest requirements.

cd gallery/
flutter pub get
flutter run
Troubleshooting

Flutter master channel

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, you may have to switch to the master channel first:

flutter channel master
flutter upgrade

When you're done, use this command to return to the safety of the stable channel:

flutter channel stable
flutter upgrade

Development

Generating localizations

If this is the first time building the Flutter Gallery, the localized code will not be present in the project directory. However, after running the application for the first time, a synthetic package will be generated containing the app's localizations through importing package:flutter_gen/gen_l10n/.

flutter pub get
flutter pub run grinder l10n

See separate README for more details.

Generating highlighted code segments
flutter pub get
flutter pub run grinder update-code-segments

See separate README for more details.

Including a new splash animation
  1. Convert your animation to a .gif file. Ideally, use a background color of 0xFF030303 to ensure the animation blends into the background of the app.

  2. Add your new .gif file to the assets directory under assets/splash_effects. Ensure the name follows the format splash_effect_$num.gif. The number should be the next number after the current largest number in the repository.

  3. Update the map _effectDurations in splash.dart to include the number of the new .gif as well as its estimated duration. The duration is used to determine how long to display the splash animation at launch.

Releasing

must be a flutter-hackers member

A set of GitHub workflows are available to help with releasing the Flutter Gallery, one per releasing platform.

  1. For Android, download the relevant Firebase configuration file (e.g. google-services.json).

  2. Bump the pubspec.yaml version number. This can be in a PR making a change or a separate PR. Use semantic versioning to determine which part to increment. The version number after the + should also be incremented. For example 1.2.3+010203 with a patch should become 1.2.4+010204.

  3. Run GitHub workflow.

  • Deploy to web: Deploys a web build to the Firebase-hosted staging or production site.

  • Deploy to Play Store: Uses Fastlane to create a beta (freely available on the Play Store) or promote an existing beta to production (Play Store).

    Note Once an .aab is created with a particular version number, it can't be replaced. The pubspec version number must be incremented again.

  • Draft GitHub release: Drafts a GitHub release, including packaged builds for Android, macOS, Linux, and Windows. Release notes can be automatically generated. The release draft is private until published. Upon being published, the specified version tag will be created.

  • Publish on Windows Store: Releasing to the Windows Store.

    Note This repository is not currently set up to publish new versions of the current Windows Store listing. Requires running msstore init within the repository and setting repository/environment secrets . See the instructions in the documentation for more information.

Escape hatch

If the above GitHub workflows aren't functional (#759), releasing can be done semi-manually. Since this requires obtaining environment secrets, this can only be done by a Googler. See go/flutter-gallery-manual-deployment.

Tests

The gallery has its own set of unit, golden, and integration tests.

In addition, Flutter itself uses the gallery in tests. To enable breaking changes, the gallery version is pinned in two places:

More Repositories

1

flutter

Flutter makes it easy and fast to build beautiful apps for mobile and beyond
Dart
157,868
star
2

plugins

Plugins for Flutter maintained by the Flutter team
Dart
17,165
star
3

samples

A collection of Flutter examples and demos
Dart
15,939
star
4

engine

The Flutter engine
C++
6,852
star
5

packages

A collection of useful packages maintained by the Flutter team
Dart
3,600
star
6

website

Flutter documentation web site
Dart
2,573
star
7

pinball

Google I/O 2022 Pinball game built with Flutter and Firebase
Dart
2,191
star
8

flutter-intellij

Flutter Plugin for IntelliJ
Java
1,906
star
9

codelabs

Flutter codelab examples
C
1,568
star
10

devtools

Performance tools for Flutter
Dart
1,466
star
11

news_toolkit

A news template application built in Flutter, by Google and Very Good Ventures. Learn more at: https://flutter.github.io/news_toolkit
Dart
1,016
star
12

photobooth

Google I/O 2021 Photo Booth built with Flutter and Firebase
Dart
894
star
13

io_flip

Google I/O 2023 FLIP AI-designed card game built with Flutter & Firebase
Dart
597
star
14

flutter_clock

Dart
542
star
15

put-flutter-to-work

A Flutter add-to-app demo you can try with your own apps
Dart
309
star
16

holobooth

Jump into a new reality to bring Dash and Sparky to life!
Dart
230
star
17

tests

Contributed tests for Flutter
Dart
219
star
18

uxr

UXR work for Flutter
Dart
214
star
19

cocoon

Flutter's build coordinator and aggregator
Dart
182
star
20

impeller

Affects Flow
155
star
21

buildroot

Build environment for the Flutter engine
Python
120
star
22

assets-for-api-docs

Static assets for embedding into docs.flutter.io
Dart
113
star
23

tools_metadata

Metadata files about the flutter framework
Dart
66
star
24

web_installers

Web install scripts for CI for Flutter Web
Dart
42
star
25

goldens

Shell
41
star
26

platform_tests

Tools & tests to verify Flutter's fidelity on specific platforms
Dart
37
star
27

games

Home of the Flutter Casual Games Toolkit and other Flutter gaming templates
Dart
27
star
28

.github

Default community health files for Flutter
26
star
29

flutter-github-scripts.dart

Scripts to facilitate generating reports on the health of the Flutter repositories.
Dart
19
star
30

flutter.github.io

Root of flutter.github.io
HTML
13
star