Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[sync] 2024/01/01 #1403

Merged
merged 73 commits into from
Jan 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
a7b0d6a
Update Msix support version to version 3.16.7 (#9891)
YehudaKremer Dec 3, 2023
f19338b
Add a link to the `testing_app` for the integration tests (#9892)
nilsreichardt Dec 4, 2023
a390ea8
Update links to use site variables (#9894)
AmosHuKe Dec 5, 2023
030d0f7
Fix analysis error from incorrect const usage (#9901)
parlough Dec 6, 2023
d6e2775
Add migration guide for `RawKeyEvent` to `KeyEvent` transition (#9889)
gspencergoog Dec 7, 2023
ac01407
MultitouchDragStrategy guide (#9899)
Piinks Dec 7, 2023
a4d8ad2
Adding mention of a known bug and its workaround (#9897)
sfshaza2 Dec 7, 2023
7883a4c
Add Introduction to Flame with Flutter codelab (#9904)
domesticmouse Dec 7, 2023
b007a92
Add link for `go/rfc-android-k-deprecation` (#9905)
dnfield Dec 7, 2023
eda7f56
Start writing migration guide for Gradle plugin apply (#9857)
bartekpacia Dec 8, 2023
7e8f414
Bump github/codeql-action from 2.22.8 to 2.22.9 (#9906)
dependabot[bot] Dec 8, 2023
471a8a1
Fix migration guide for "deprecated gradle plugin apply" (#9907)
bartekpacia Dec 8, 2023
ada3303
Updated commands for newer convention (#9909)
KarthiDreamr Dec 10, 2023
ca7a5a8
Bump ruby from `02a091c` to `14eba67` (#9911)
dependabot[bot] Dec 11, 2023
3219c78
Bump examples/codelabs from `4e2eb0c` to `42bdf45` (#9912)
dependabot[bot] Dec 11, 2023
7d95c26
Remove workshop mentions from codelab page (#9908)
parlough Dec 11, 2023
7abb554
Recommend not using dart:io/dart:html to make HTTP requests (#9915)
brianquinlan Dec 11, 2023
829bf57
Clarifying when AppLocalizations can be initialized. (#9916)
sfshaza2 Dec 12, 2023
07a4ea0
Fix small typos/updates in key-event-migration.md (#9917)
gspencergoog Dec 12, 2023
8a01d28
Tiny fix outdated link (#9919)
fzyzcjy Dec 13, 2023
aab97af
Bump github/codeql-action from 2.22.9 to 2.22.10 (#9920)
dependabot[bot] Dec 13, 2023
f2a7b1e
Update misleading comment in code snippet in background-parsing.md (#…
rishitc Dec 13, 2023
42a42ec
Bump pigeon from 14.0.1 to 15.0.1 in /examples/development/platform_i…
dependabot[bot] Dec 13, 2023
d8a2cdf
Add `title` attributes to all `iframe` videos per WCAG guidelines (#9…
atsansone Dec 13, 2023
eb0411b
Refactor debugging through coding (#9455)
atsansone Dec 13, 2023
d93a46c
Update layout tutorial for current best practices (#9893)
atsansone Dec 13, 2023
bcf233f
Fix links and header case in key-event-migration guide (#9922)
parlough Dec 14, 2023
4579089
Revert "Update layout tutorial for current best practices" (#9927)
parlough Dec 14, 2023
4cf87a4
Bump github/codeql-action from 2.22.10 to 3.22.11 (#9928)
dependabot[bot] Dec 14, 2023
512f569
Adding more info on writing adaptive apps (#9924)
sfshaza2 Dec 14, 2023
9609203
Correct days/weeks typo (#9929)
domesticmouse Dec 14, 2023
9d7cc0c
Bump actions/upload-artifact from 3.1.3 to 4.0.0 (#9930)
dependabot[bot] Dec 15, 2023
5a8dcb0
Add `/go/go-router-v13-breaking-changes` redirect (#9934)
chunhtai Dec 15, 2023
8c22491
Remove DevTools survey metadata json and add redirect. (#9935)
kenzieschmoll Dec 15, 2023
9fa96a3
Bump examples/codelabs from `42bdf45` to `eb26557` (#9939)
dependabot[bot] Dec 18, 2023
d3ead19
Revert "Remove DevTools survey metadata json and add redirect." (#9941)
kenzieschmoll Dec 18, 2023
0def5a5
Adding a preso on Monetization to the games table (#9933)
sfshaza2 Dec 18, 2023
44a5d87
Bump actions/setup-node from 4.0.0 to 4.0.1 (#9945)
dependabot[bot] Dec 19, 2023
83e2e00
Bump ruby from `14eba67` to `82e122e` (#9944)
dependabot[bot] Dec 19, 2023
cd09215
Restore "Update layout tutorial for current best practices" with upda…
atsansone Dec 20, 2023
919cb74
Add back accidentally removed survey metadata (#9947)
parlough Dec 20, 2023
c5d2551
Bump ruby from `82e122e` to `00c43b8` (#9948)
dependabot[bot] Dec 20, 2023
a41bd69
Bump examples/codelabs from `eb26557` to `9eb4753` (#9949)
dependabot[bot] Dec 20, 2023
955f469
Remove link to old desktop embedding repository (#9951)
loic-sharma Dec 20, 2023
8e6e874
Add /go/match-xcode-deployment-range doc redirect (#9952)
jmagman Dec 20, 2023
83a10b5
Windows Getting Started POC (#9238)
atsansone Dec 20, 2023
301025e
Remove survey metadata redirect (#9954)
kenzieschmoll Dec 21, 2023
534aa3f
Refactor macOS Getting Started (#9736)
atsansone Dec 21, 2023
a78d7d2
Integrate games cookbook recipes with the code excerpts machinery (#9…
filiph Dec 21, 2023
e5b6d6d
Remove hanging `<` (#9958)
filiph Dec 21, 2023
090823c
Bump examples/codelabs from `9eb4753` to `93555bd` (#9956)
dependabot[bot] Dec 21, 2023
c1f202c
Bump ruby from `00c43b8` to `75f884a` (#9957)
dependabot[bot] Dec 21, 2023
a66e28d
Update Video links on Firebase page (#9955)
atsansone Dec 21, 2023
9c60425
Added links to tracking video examples (#9959)
atsansone Dec 21, 2023
5c1c5c6
Bump github/codeql-action from 3.22.11 to 3.22.12 (#9962)
dependabot[bot] Dec 22, 2023
55cb899
Bump examples/codelabs from `93555bd` to `cb35535` (#9961)
dependabot[bot] Dec 22, 2023
5562114
Update project-setup.md (#9963)
dcharkes Dec 22, 2023
0a0be16
Added note to horizontal list recipe (#9960)
atsansone Dec 25, 2023
aa4362e
Changed Flutter verify instructions (#9968)
atsansone Dec 27, 2023
593966a
Reduced Material widget descriptions to less than 25 words (#9969)
atsansone Dec 27, 2023
98c8244
Add sections to Flavors page about flavor-conditional asset bundling …
andrewkolos Dec 27, 2023
8cc6b5b
Update to firebase-tools v13 to resolve deprecation warning (#9972)
parlough Dec 27, 2023
4ce695f
Update site to use Ruby 3.3, yjit, and latest gems (#9971)
parlough Dec 27, 2023
962a7de
Added centralized repos in Gradle step (#9973)
atsansone Dec 28, 2023
27890a3
Add "Conditionally listen on InheritedWidgets" design doc (#9978)
rrousselGit Dec 30, 2023
d4786a3
Refactored font page (#9974)
atsansone Dec 31, 2023
fb7665b
Sync: 2024/01/01
AmosHuKe Jan 1, 2024
2a27794
Fix: links
AmosHuKe Jan 1, 2024
2c930d0
Fix: links
AmosHuKe Jan 1, 2024
909d3f2
Fix: video URL variable not included
AmosHuKe Jan 2, 2024
c9f69b8
Update: video links (bilibili) to use site variables
AmosHuKe Jan 2, 2024
ecab8d1
Update: CN translation
AmosHuKe Jan 2, 2024
679fbc4
Merge branch 'main' into sync-20240101
AmosHuKe Jan 26, 2024
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
  •  
  •  
  •  
36 changes: 18 additions & 18 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ jobs:
submodules: recursive
- name: Build site and check links
run: make build BUILD_CONFIGS=_config.yml,_config_stage.yml
# - name: Install Node for Firebase install
# uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65
# with:
# node-version: ${{ env.NODE_VERSION }}
# - name: Install Firebase CLI
# run: npm install -g firebase-tools@12.9.1
# - name: Install Node for Firebase install
# uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8
# with:
# node-version: ${{ env.NODE_VERSION }}
# - name: Install Firebase CLI
# run: npm install -g firebase-tools@13.0.2
- uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d
with:
sdk: stable
Expand All @@ -77,18 +77,18 @@ jobs:
submodules: recursive
- name: Build site and check links
run: make build
# - name: Install Node for Firebase install
# uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65
# with:
# node-version: ${{ env.NODE_VERSION }}
# - name: Install Firebase CLI
# run: npm install -g firebase-tools@12.9.1
# - uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d
# with:
# sdk: stable
# - run: tool/check-links.sh
# - name: Deploy to Firebase hosting
# run: make deploy # TODO(drewroengoogle) Run deploy on Cloud Build.
# - name: Install Node for Firebase install
# uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8
# with:
# node-version: ${{ env.NODE_VERSION }}
# - name: Install Firebase CLI
# run: npm install -g firebase-tools@13.0.2
# - uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d
# with:
# sdk: stable
# - run: tool/check-links.sh
# - name: Deploy to Firebase hosting
# run: make deploy # TODO(drewroengoogle) Run deploy on Cloud Build.
- name: Deploy CN
run: make deploy
env:
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ but two of the primary repos are the
[Flutter SDK](https://github.com/flutter/flutter), and this repo, the
[Flutter website](https://github.com/flutter/website).
To contribute a fix to a repo, submit a [pull request
(PR)](https://services.github.com/on-demand/github-cli/open-pull-request-github).
(PR)](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request).

For information on contributing code or API docs to the Flutter SDK, see
[Contributing to
Expand Down
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ruby:3.2.2-slim-bookworm@sha256:02a091c83d1aa1070c0f6fefcbd2aff58ddd3430e2d5661c6ef2142b1383349b AS base
FROM ruby:3.3-slim-bookworm@sha256:763422273a15e307b044fcb3ad6b1ef6c290d2043ac73596842aba5659dc7318 as base

SHELL ["/usr/bin/bash", "-c"]

Expand Down Expand Up @@ -85,6 +85,7 @@ FROM node AS dev
#RUN bundle config mirror.https://rubygems.org https://mirrors.tuna.tsinghua.edu.cn/rubygems

ENV JEKYLL_ENV=development
ENV RUBY_YJIT_ENABLE=1
RUN gem install bundler
COPY Gemfile Gemfile.lock ./
RUN bundle config set force_ruby_platform true
Expand Down Expand Up @@ -116,6 +117,7 @@ RUN tool/move_docs.sh; tool/translator/build.sh
FROM node AS build

ENV JEKYLL_ENV=production
ENV RUBY_YJIT_ENABLE=1
RUN gem install bundler
COPY Gemfile Gemfile.lock ./
RUN bundle config set force_ruby_platform true
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
source 'https://rubygems.org'

gem 'jekyll', '4.3.2'
gem 'jekyll', '4.3.3'
gem 'jekyll-sass-converter', '~> 3.0.0'
gem 'webrick'

Expand Down
16 changes: 8 additions & 8 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ GEM
minitest (>= 5.1)
mutex_m
tzinfo (~> 2.0)
addressable (2.8.5)
addressable (2.8.6)
public_suffix (>= 2.0.2, < 6.0)
base64 (0.2.0)
bigdecimal (3.1.4)
bigdecimal (3.1.5)
colorator (1.1.0)
concurrent-ruby (1.2.2)
connection_pool (2.4.1)
Expand All @@ -28,11 +28,11 @@ GEM
forwardable-extended (~> 2.5)
ffi (1.16.3)
forwardable-extended (2.6.0)
google-protobuf (3.25.0)
google-protobuf (3.25.1)
http_parser.rb (0.8.0)
i18n (1.14.1)
concurrent-ruby (~> 1.0)
jekyll (4.3.2)
jekyll (4.3.3)
addressable (~> 2.4)
colorator (~> 1.0)
em-websocket (~> 0.5)
Expand Down Expand Up @@ -72,12 +72,12 @@ GEM
mini_portile2 (2.8.5)
minitest (5.20.0)
mutex_m (0.2.0)
nokogiri (1.15.4)
nokogiri (1.15.5)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
public_suffix (5.0.3)
public_suffix (5.0.4)
racc (1.7.3)
rake (13.1.0)
rb-fsevent (0.11.2)
Expand All @@ -102,12 +102,12 @@ PLATFORMS

DEPENDENCIES
activesupport (~> 7.1.2)
jekyll (= 4.3.2)
jekyll (= 4.3.3)
jekyll-include-cache (~> 0.2.1)
jekyll-sass-converter (~> 3.0.0)
jekyll-toc (~> 0.18.0)
liquid-tag-parser (~> 2.0.2)
webrick

BUNDLED WITH
2.4.21
2.5.3
41 changes: 41 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,44 @@ flutterfire: https://firebase.flutter.dev
dartpadx-dart: https://dartpad.cn/experimental/embed-new-dart.html ## Adding the exp version for dart here.
youtube-site: https://youtube.com

## Software minimum versions

appmin:
github_win: 2.4
github_mac: 2.4
vscode: 1.75
android_studio: '2022.3 (Giraffe) or later'
intellij_idea: '2022.3 or later'
android_sdk: 19
powershell: 5.0
devmin:
windows: '64-bit version of Microsoft Windows 10'
macos: '10.14 (Mojave)'
linux:
debian: 10
ubuntu: '18.04 LTS'
targetmin:
windows: 'Microsoft Windows 7'
macos: '10.13 (Ventura)'
linux:
debian: 9
ubuntu: '18.04 LTS'
ios: 11
android: 'Android API level 19'

## Software current versions

appnow:
flutter: '3.13.4'
github_win: 2.4
vscode: '1.81.1'
android_studio: '2022.3 (Giraffe) or later'
android_sdk: '33.0.0'
intellij: '2023.1'
powershell: 5.0
xcode: '15'
ios: '17'
cocoapods: '1.12'

########### Jekyll ###########

Expand Down Expand Up @@ -182,6 +220,9 @@ alert:
version-note: >-
<aside class="alert alert-info" role="alert" markdown="1">
<i class="material-icons" aria-hidden="true">merge_type</i> **版本提示:**
recommend: >-
<aside class="alert alert-success alert-icon" role="alert" markdown="1">
<i class="material-icons" aria-hidden="true">bolt</i>
secondary: >-
<aside class="alert alert-secondary" role="alert" markdown="1">
tip: >-
Expand Down
2 changes: 1 addition & 1 deletion examples/basics/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class MyApp extends StatelessWidget {
appBar: AppBar(
title: const Text('Nullable Fields Demo'),
),
body: const Center(
body: Center(
child: Column(
children: [
Text('anInt is $anInt.'),
Expand Down
2 changes: 1 addition & 1 deletion examples/codelabs
Submodule codelabs updated 1613 files
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Take our settings from the example_utils analysis_options.yaml file.
# If necessary for a particular example, this file can also include
# overrides for individual lints.

include: package:example_utils/analysis.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
import 'dart:async';

import 'package:games_services/games_services.dart';
import 'package:logging/logging.dart';

/// Allows awarding achievements and leaderboard scores,
/// and also showing the platforms' UI overlays for achievements
/// and leaderboards.
///
/// A facade of `package:games_services`.
class GamesServicesController {
static final Logger _log = Logger('GamesServicesController');

final Completer<bool> _signedInCompleter = Completer();

Future<bool> get signedIn => _signedInCompleter.future;

/// Unlocks an achievement on Game Center / Play Games.
///
/// You must provide the achievement ids via the [iOS] and [android]
/// parameters.
///
/// Does nothing when the game isn't signed into the underlying
/// games service.
Future<void> awardAchievement(
{required String iOS, required String android}) async {
if (!await signedIn) {
_log.warning('Trying to award achievement when not logged in.');
return;
}

try {
await GamesServices.unlock(
achievement: Achievement(
androidID: android,
iOSID: iOS,
),
);
} catch (e) {
_log.severe('Cannot award achievement: $e');
}
}

/// Signs into the underlying games service.
Future<void> initialize() async {
try {
await GamesServices.signIn();
// The API is unclear so we're checking to be sure. The above call
// returns a String, not a boolean, and there's no documentation
// as to whether every non-error result means we're safely signed in.
final signedIn = await GamesServices.isSignedIn;
_signedInCompleter.complete(signedIn);
} catch (e) {
_log.severe('Cannot log into GamesServices: $e');
_signedInCompleter.complete(false);
}
}

/// Launches the platform's UI overlay with achievements.
Future<void> showAchievements() async {
if (!await signedIn) {
_log.severe('Trying to show achievements when not logged in.');
return;
}

try {
await GamesServices.showAchievements();
} catch (e) {
_log.severe('Cannot show achievements: $e');
}
}

/// Launches the platform's UI overlay with leaderboard(s).
Future<void> showLeaderboard() async {
if (!await signedIn) {
_log.severe('Trying to show leaderboard when not logged in.');
return;
}

try {
await GamesServices.showLeaderboards(
// TODO: When ready, change both these leaderboard IDs.
iOSLeaderboardID: 'some_id_from_app_store',
androidLeaderboardID: 'sOmE_iD_fRoM_gPlAy',
);
} catch (e) {
_log.severe('Cannot show leaderboard: $e');
}
}

/// Submits [score] to the leaderboard.
Future<void> submitLeaderboardScore(int score) async {
if (!await signedIn) {
_log.warning('Trying to submit leaderboard when not logged in.');
return;
}

_log.info('Submitting $score to leaderboard.');

try {
await GamesServices.submitScore(
score: Score(
// TODO: When ready, change these leaderboard IDs.
iOSLeaderboardID: 'some_id_from_app_store',
androidLeaderboardID: 'sOmE_iD_fRoM_gPlAy',
value: score,
),
);
} catch (e) {
_log.severe('Cannot submit leaderboard score: $e');
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// ignore_for_file: unused_catch_clause

import 'package:flutter/services.dart';
import 'package:games_services/games_services.dart';

void main() async {
// #docregion signIn
try {
await GamesServices.signIn();
} on PlatformException catch (e) {
// ... deal with failures ...
}
// #enddocregion signIn

// #docregion unlock
await GamesServices.unlock(
achievement: Achievement(
androidID: 'your android id',
iOSID: 'your ios id',
),
);
// #enddocregion unlock

// #docregion showAchievements
await GamesServices.showAchievements();
// #enddocregion showAchievements

// #docregion submitScore
await GamesServices.submitScore(
score: Score(
iOSLeaderboardID: 'some_id_from_app_store',
androidLeaderboardID: 'sOmE_iD_fRoM_gPlAy',
value: 100,
),
);
// #enddocregion submitScore

// #docregion showLeaderboards
await GamesServices.showLeaderboards(
iOSLeaderboardID: 'some_id_from_app_store',
androidLeaderboardID: 'sOmE_iD_fRoM_gPlAy',
);
// #enddocregion showLeaderboards
}
19 changes: 19 additions & 0 deletions examples/cookbook/games/achievements_leaderboards/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: games_services_example
description: Games services

environment:
sdk: ^3.2.0

dependencies:
flutter:
sdk: flutter

games_services: ^4.0.0
logging: ^1.2.0

dev_dependencies:
example_utils:
path: ../../../example_utils

flutter:
uses-material-design: true
Loading
Loading