1 Star 1 Fork 0

lyj / gallery

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
BSD-3-Clause

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

That being said, extra steps must be taken to enable Desktop support. For example, to run the macOS app:

cd gallery/
flutter config --enable-macos-desktop
flutter create .
flutter run -d macos

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.

To include 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 localized strings and highlighted code segments

To generate localized strings or highlighted code segments, make sure that you have grinder installed. You can install it by getting the packages in samples/gallery/:

flutter pub get

To generate localized strings (see separate README for more details):

flutter pub run grinder l10n

To generate code segments (see separate README for more details):

flutter pub run grinder update-code-segments

Creating a new release (for Flutter org members)

  1. Bump the version number up in the pubspec.yaml. Use semantic versioning to determine which number to increment. For example 2.2.0+020200 should become 2.3.0+020300.

  2. Create a tag on the master branch of this repo in the form of v2.3.

    • git tag v2.3
    • git push --tags
  3. Publish the web release (using the peanut package).

    • flutter pub global activate peanut
    • flutter pub global run peanut:peanut
    • git push upstream gh-pages:gh-pages
      • git update-ref refs/heads/gh-pages upstream/gh-pages if you need to align with upstream.
  4. 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).
  5. 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 macos and zipping the app inside build/macos/Build/Products/Release.
    • Optional: Create and upload the Linux/Windows builds.
    • Publish the release.
BSD 3-Clause License Copyright (c) 2020, Flutter All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

简介

暂无描述 展开 收起
BSD-3-Clause
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/lyj0309/gallery.git
git@gitee.com:lyj0309/gallery.git
lyj0309
gallery
gallery
master

搜索帮助