Skip to content
This repository was archived by the owner on Jun 13, 2024. It is now read-only.

Initial copy of gallery with history #1

Merged
merged 93 commits into from
Mar 5, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
93 commits
Select commit Hold shift + click to select a range
563e7e6
Merge in the flutter gallery (#176)
rami-a Dec 10, 2019
301adde
Change links to adaptive.dart and splash.dart (#179)
ekremkenter Dec 12, 2019
25e520f
Update semantic label of study back button (#188)
rami-a Dec 16, 2019
624385f
Makefile for gallery so we can run the l10n script (#184)
perclasson Dec 17, 2019
42cfb5a
Fix apk release issue for new Flutter Gallery (#185)
JoseAlba Dec 17, 2019
6410ee6
[Gallery] Add Snackbars demo (#186)
perclasson Dec 17, 2019
d5189f8
Gallery — Shrine: Update Letter Spacing (#187)
pennzht Dec 17, 2019
7bccd7e
Adding in the latest translations for Gallery (#190)
rami-a Dec 17, 2019
0f97fda
flutter pub upgrade (#178)
domesticmouse Dec 17, 2019
097211d
Shrine: Remove Large Gaps at Bottom of Screen (#193)
pennzht Dec 18, 2019
313bb6a
[Gallery] Implement Cupertino tab bar demo (#195)
rami-a Dec 18, 2019
b928c2c
[Gallery] Convert the Makefile to instead use the Dart workflow packa…
perclasson Dec 19, 2019
2fb414a
Just use url_launcher (#194)
guidezpl Dec 19, 2019
684463a
Implement Cupertino switch and slider demos (#196)
rami-a Dec 20, 2019
30dcf92
[Gallery] Add Material Sliders demo (#198)
perclasson Dec 20, 2019
5a80f57
Modify gallery grinder script to use preferred-ordered-locales (#203)
Dec 30, 2019
6b27840
Fix padding of bottom buttons on home page (#201)
rami-a Jan 2, 2020
857b99f
[Gallery] Implement Bottom app bar demo (#202)
rami-a Jan 2, 2020
81d8bea
[Gallery] Latest translations (#204)
rami-a Jan 2, 2020
dce2ba0
[Gallery] Implement material progress indicator and cupertino activit…
rami-a Jan 2, 2020
b1c9402
[Gallery] Remove MaterialApp for demo screen for simplification (#197)
perclasson Jan 7, 2020
5971c65
Bump gallery to v2.1 (#208)
rami-a Jan 7, 2020
79cd88e
Ensure the ink is clipped on the settings button (#209)
rami-a Jan 7, 2020
e3ea7bc
Remove top safe area from demo screen for desktop layout (#210)
rami-a Jan 7, 2020
3abdc6a
Remove back button from demo appbars (#213)
rami-a Jan 8, 2020
6831b23
[Gallery] Implement cupertino navbar demo (#214)
rami-a Jan 8, 2020
137fdcd
Implement grid list demo (#215)
rami-a Jan 8, 2020
9a266b9
Account for safe area for shrine shopping cart on mobile (#216)
rami-a Jan 8, 2020
13a868b
[Gallery] Add Material Menu demo (#212)
perclasson Jan 9, 2020
e37fb8a
Implement tooltip demo (#220)
rami-a Jan 9, 2020
20a7ea2
[Gallery] Implement cupertino pull-to-refresh demo (#221)
rami-a Jan 9, 2020
6c10ea3
Add command to travis CI to analyze if update-code-segments has been …
perclasson Jan 10, 2020
72cb0f0
[Gallery] Refactor list of demos to use common variables (#224)
rami-a Jan 10, 2020
90f75e4
Cupertino textfield demo (#225)
rami-a Jan 10, 2020
4508a3c
Remove uneeded source (#226)
guidezpl Jan 10, 2020
05935ef
Move com.example to dev.flutter (#227)
domesticmouse Jan 13, 2020
ab843a6
flutter pub upgrade (#241)
domesticmouse Jan 14, 2020
ecd0285
Scripting flutter pub upgrade (#242)
domesticmouse Jan 16, 2020
7ca0b5a
[Gallery] Latest translations (#246)
rami-a Jan 21, 2020
e1c7a14
Bump version to 2.2 (#247)
rami-a Jan 21, 2020
7da6333
Added Material Banner demo and Material Card demo (#238)
JoseAlba Jan 21, 2020
e7cd3f3
Remove extra semantic node from shrine app bar (#248)
rami-a Jan 22, 2020
80c4434
Updated translation on tooltip for code sample (#250)
JoseAlba Jan 22, 2020
cbc8874
[Gallery] Implement material picker demo (#249)
rami-a Jan 23, 2020
bb84c34
[Gallery] Implement cupertino pickers demo (#251)
rami-a Jan 23, 2020
49c7244
[Gallery] Crane focus (#254)
guidezpl Jan 24, 2020
88fefac
Enable copy to clipboard for web, as it's added to Flutter master cha…
perclasson Jan 24, 2020
d9b05d4
[Gallery] Add animation for settings backdrop (#252)
perclasson Jan 24, 2020
626be29
[Gallery] Use new package flutter_localized_locales (#256)
guidezpl Jan 24, 2020
5b90c64
Remove hardcoded strings that were a workaround for raw string proble…
rami-a Jan 24, 2020
92e65a2
[Gallery] Hide snackbar before showing one (#258)
guidezpl Jan 24, 2020
a2fa06b
Don't overflow cards text (#261)
guidezpl Jan 24, 2020
eee8c83
[Gallery] Add version number to About dialog (#260)
guidezpl Jan 24, 2020
5ab0a16
[Gallery] Implement Material Data table demo (#262)
rami-a Jan 24, 2020
8f32cdf
Don't remove SettingsListItem content from tree (#259)
guidezpl Jan 27, 2020
8eeca68
Add new Flare assets now that After Effects lets us export Rive asset…
perclasson Jan 27, 2020
f6f7e10
Update capitalization of cupertino demo titles to be consistent with …
rami-a Jan 27, 2020
5bd7408
[Gallery] Add Travis CI check that l10n command has been run for the …
perclasson Jan 28, 2020
5ee7e65
[Gallery] Use io.flutter as organization instead of placeholder (#286)
guidezpl Jan 28, 2020
e4a623a
[Gallery] Close Shrine cart on back button press for android (#288)
perclasson Jan 28, 2020
62d6460
[Gallery] Added platform dependent separator for cross platform compa…
heman4t Jan 28, 2020
fc17fc7
Prevent shrine login screen from allowing overscroll (#274)
rami-a Jan 28, 2020
14be615
[Gallery] Preserve demo state, simplify demo width calculations on de…
guidezpl Jan 28, 2020
2bf973e
Add options to tabs demo (#290)
guidezpl Jan 28, 2020
ee66d4b
[Gallery] Add padding to demo appBar (#289)
guidezpl Jan 28, 2020
4097edf
[Gallery] Exclude semantics for logo and change to hint for products …
perclasson Jan 29, 2020
71d6e4f
[Gallery] Add transformations demo (#291)
guidezpl Jan 29, 2020
c01adc1
[Gallery] Localize durations for Crane (#294)
perclasson Jan 30, 2020
7218111
Add OrdinalSortKey to Shrine shopping cart (#295)
perclasson Jan 30, 2020
d3bb787
[Gallery] Modify desktop layout for crane when running in "Small desk…
rami-a Jan 30, 2020
ef682c2
[Gallery] Fix divider for bottom sheet demo on web (#300)
guidezpl Jan 31, 2020
bbf1afb
[Gallery] Text field demo fixes (#302)
guidezpl Jan 31, 2020
2fd3adb
[Gallery] Fix slow motion setting announcement (#301)
guidezpl Jan 31, 2020
221b3ef
Rename REFERENCE STYLES & MEDIA category to STYLES & OTHER (#303)
guidezpl Jan 31, 2020
73f8984
[Gallery] Use google_fonts (#299)
guidezpl Feb 3, 2020
acbeb82
[Gallery] Disallow GoogleFonts http loading (#307)
guidezpl Feb 4, 2020
c5beb31
[Gallery] Implement Fortnightly study (#304)
rami-a Feb 4, 2020
2a1ad46
[Gallery] Tweak banner colors (#311)
rami-a Feb 4, 2020
312ddf1
[Gallery] Fix directory structure (#312)
guidezpl Feb 5, 2020
b97f71a
[Gallery] Implement Desktop study carousel (#315)
rami-a Feb 5, 2020
ecd9705
[Gallery] Bring in the latest translations (#316)
rami-a Feb 5, 2020
d85d839
[Gallery] Update desktop Rally for pages that did not have designs be…
perclasson Feb 6, 2020
13c3bbc
[Gallery] Implement Crane middle front layer (#318)
guidezpl Feb 6, 2020
723eb5f
[Gallery] Bring in Fortnightly banner (#317)
rami-a Feb 6, 2020
2939c3b
Add screenshots, edit README (#319)
guidezpl Feb 7, 2020
7e26897
[Gallery] Bump version to 2.3 (#321)
rami-a Feb 7, 2020
d04d40d
Update cupertino_icons: from 0.1.2 to 0.1.3 (#325)
prasadsunny1 Feb 12, 2020
275df88
[Gallery] Update README with steps to create a release (#327)
rami-a Feb 18, 2020
66775ec
[Gallery] Bring in latest translations (#329)
rami-a Feb 19, 2020
318c710
add web_dashboard API (#333)
johnpryan Mar 3, 2020
898a2f7
Fix Crane search bar margin (#350)
guidezpl Mar 5, 2020
6c0e550
[Gallery] Revert provisioning changes (#352)
guidezpl Mar 5, 2020
57530ea
merge
clocksmith Mar 5, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
90 changes: 74 additions & 16 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,21 +1,79 @@
# See https://www.dartlang.org/guides/libraries/private-files
# Miscellaneous
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom/
.buildlog/
.history
.svn/
.firebase/
.flutter-plugins-dependencies

# Files and directories created by pub
# IntelliJ related
*.iml
*.ipr
*.iws
.idea/

# The .vscode folder contains launch configuration and tasks you configure in
# VS Code which you may wish to be included in version control, so this line
# is commented out by default.
#.vscode/

# Flutter/Dart/Pub related
**/doc/api/
.dart_tool/
.flutter-plugins
.flutter-plugins-dependencies
.packages
build/
# If you're building an application, you may want to check-in your pubspec.lock
pubspec.lock
.pub-cache/
.pub/
/build/

# Android related
**/android/**/gradle-wrapper.jar
**/android/.gradle
**/android/captures/
**/android/gradlew
**/android/gradlew.bat
**/android/local.properties
**/android/**/GeneratedPluginRegistrant.java

# iOS/XCode related
**/ios/**/*.mode1v3
**/ios/**/*.mode2v3
**/ios/**/*.moved-aside
**/ios/**/*.pbxuser
**/ios/**/*.perspectivev3
**/ios/**/*sync/
**/ios/**/.sconsign.dblite
**/ios/**/.tags*
**/ios/**/.vagrant/
**/ios/**/DerivedData/
**/ios/**/Icon?
**/ios/**/Pods/
**/ios/**/.symlinks/
**/ios/**/profile
**/ios/**/xcuserdata
**/ios/.generated/
**/ios/Flutter/App.framework
**/ios/Flutter/Flutter.framework
**/ios/Flutter/Generated.xcconfig
**/ios/Flutter/app.flx
**/ios/Flutter/app.zip
**/ios/Flutter/flutter_assets/
**/ios/Flutter/flutter_export_environment.sh
**/ios/ServiceDefinitions.json
**/ios/Runner/GeneratedPluginRegistrant.*

# Directory created by dartdoc
# If you don't generate documentation locally you can remove this line.
doc/api/
# Web related
lib/generated_plugin_registrant.dart

# Avoid committing generated Javascript files:
*.dart.js
*.info.json # Produced by the --dump-info flag.
*.js # When generated by dart2js. Don't specify *.js if your
# project includes source files written in JavaScript.
*.js_
*.js.deps
*.js.map
# Exceptions to above rules.
!**/ios/**/default.mode1v3
!**/ios/**/default.mode2v3
!**/ios/**/default.pbxuser
!**/ios/**/default.perspectivev3
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
10 changes: 10 additions & 0 deletions .metadata
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled and should not be manually edited.

version:
revision: f5733f7a62ebc7c2ba324a2b410cd81215956b7d
channel: master

project_type: app
104 changes: 102 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,102 @@
# gallery
Flutter Gallery sample
# 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](https://user-images.githubusercontent.com/6655696/73928238-0d7fcc80-48d3-11ea-8a7e-ea7dc5d6e713.png)

## 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](
https://github.com/flutter/flutter/wiki/Desktop-shells#tooling). 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](lib/layout/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](lib/pages/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](https://pub.dev/packages/grinder) installed. You can install it
by getting the packages in `samples/gallery/`:
```
flutter pub get
```

To generate localized strings (see separate [README](lib/l10n/README.md)
for more details):

```
flutter pub run grinder l10n
```

To generate code segments (see separate [README](tool/codeviewer_cli/README.md) 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 `gallery-v2.3`.
* `git tag gallery-v2.3`
* `git push --tags`

3. Publish the web release (using the [peanut package](https://pub.dev/packages/peanut)).
* `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.3`
* 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.
33 changes: 33 additions & 0 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
include: package:pedantic/analysis_options.1.8.0.yaml

analyzer:
exclude:
- lib/l10n/messages_*.dart
strong-mode:
implicit-casts: false
implicit-dynamic: false

linter:
rules:
- avoid_types_on_closure_parameters
- avoid_void_async
- await_only_futures
- camel_case_types
- cancel_subscriptions
- close_sinks
- constant_identifier_names
- control_flow_in_finally
- empty_statements
- hash_and_equals
- implementation_imports
- non_constant_identifier_names
- package_api_docs
- package_names
- package_prefixed_library_names
- test_types_in_equals
- throw_in_finally
- unnecessary_brace_in_string_interps
- unnecessary_getters_setters
- unnecessary_new
- unnecessary_statements
- directives_ordering
12 changes: 12 additions & 0 deletions android/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
gradle-wrapper.jar
/.gradle
/captures/
/gradlew
/gradlew.bat
/local.properties
GeneratedPluginRegistrant.java

# Visual Studio Code related
.classpath
.project
.settings/
66 changes: 66 additions & 0 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}

def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}

def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}

def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 28

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}

lintOptions {
disable 'InvalidPackage'
}

defaultConfig {
applicationId "io.flutter.demo.gallery"
minSdkVersion 16
targetSdkVersion 28
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
}
}
}

flutter {
source '../..'
}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
}
7 changes: 7 additions & 0 deletions android/app/src/debug/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="io.flutter.demo.gallery">
<!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="android.permission.INTERNET"/>
</manifest>
33 changes: 33 additions & 0 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="io.flutter.demo.gallery">

<!-- io.flutter.app.FlutterApplication is an android.app.Application that
calls FlutterMain.startInitialization(this); in its onCreate method.
In most cases you can leave this as-is, but you if you want to provide
additional functionality it is fine to subclass or reimplement
FlutterApplication and put your custom class here. -->
<application
android:name="io.flutter.app.FlutterApplication"
android:label="Flutter Gallery"
android:icon="@mipmap/ic_launcher">
<activity
android:name=".MainActivity"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
<!-- This keeps the window background of the activity showing
until Flutter renders its first frame. It can be removed if
there is no splash screen (such as the default splash screen
defined in @style/LaunchTheme). -->
<meta-data
android:name="io.flutter.app.android.SplashScreenUntilFirstFrame"
android:value="true" />
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
</application>
</manifest>
Binary file added android/app/src/main/ic_launcher-web.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package io.flutter.demo.gallery

import android.os.Bundle

import io.flutter.app.FlutterActivity
import io.flutter.plugins.GeneratedPluginRegistrant

class MainActivity: FlutterActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
GeneratedPluginRegistrant.registerWith(this)
}
}
12 changes: 12 additions & 0 deletions android/app/src/main/res/drawable/launch_background.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Modify this file to customize your launch splash screen -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@color/backgroundColor" />

<!-- You can insert your own image assets here -->
<!-- <item>
<bitmap
android:gravity="center"
android:src="@mipmap/launch_image" />
</item> -->
</layer-list>
Loading