Giter Club home page Giter Club logo

gallery's Introduction

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

Running Flutter Gallery on Flutter's 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, make sure 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

Supported Platforms

Flutter 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 pub get
flutter run -d windows

Additionally, 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.

Development

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.

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.

Creating a new release (for Flutter org members)

  1. Version bump: 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.

  2. Staging: After the version bump PR is merged, push a new version tag to master.

git pull upstream master
git tag v1.2.4  # note the v
git push upstream v1.2.4

This will trigger a set of GitHub Actions workflows that will:

  • Draft a GitHub release with automatically generated release notes and packaged builds (.apk, macOS, Windows, and Linux)
  • Deploy the gallery to the Firebase hosted staging site
  • Deploy a new Android build to the Play Store beta track

Note: all GitHub Action workflows can also be run manually

  1. Production: Once satisfied,
    • Publish the drafted GitHub release (Edit draft -> Publish release).
    • Deploy the gallery to the Firebase hosted production site by running this workflow with prod using GitHub's UI.
    • Promote the Play Store beta to production by running this workflow with promote_to_production using GitHub's UI.

More information about doing these things locally is available at go/flutter-gallery-manual-deployment.

Tests

The gallery has its own set of unit and integration tests. Flutter itself also uses it in tests. To enable breaking changes, the gallery version is pinned in two places:

gallery's People

Contributors

guidezpl avatar rami-a avatar perclasson avatar renzo-olivares avatar clocksmith avatar alabhya268 avatar josealba avatar pennzht avatar hansmuller avatar piinks avatar liyuqian avatar jason-simmons avatar domesticmouse avatar dnfield avatar ferhatb avatar jonahwilliams avatar xster avatar justinmc avatar stuartmorgan avatar yash1200 avatar ayshiff avatar johnsonmh avatar gozeloglu avatar gspencergoog avatar garyqian avatar darrenaustin avatar prasadsunny1 avatar mi6ock avatar michaellee8 avatar dependabot[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.