Closed8

Flutter 3.19.0周りをInput・触ってみた

ImajoImajo

Gemini Google AI Dart SDK beta release
The Google AI Dart SDK has been released to beta. This enables you to build generative AI features into your Dart or Flutter app, powered by Gemini, Google’s latest family of AI models. There is now a google_generative_ai package on pub.dev. Learn more about how to build with the Google AI Dart SDK in this blog post or jump straight into the Dart quickstart.

Google AI のpuckageが出た。
Flutterのサンプルアプリがあるのでcloneして起動してみる

https://github.com/google/generative-ai-dart/tree/main/samples/flutter_app

flutter run --dart-define=API_KEY=$GOOGLE_API_KEY

API_KEYを指定するだけでrunできる。
API keyはこちらから。https://aistudio.google.com/app/apikey

↓のようなUI

ImajoImajo

Flutter used to scroll twice as fast if you dragged two fingers. You can now configure the default ScrollBehavior with MultiTouchDragStrategy.latestPointer to get number-of-fingers-agnostic scrolling behavior. For more information on this change, see the migration guide.

翻訳: Flutter では、2 本の指をドラッグすると 2 倍の速度でスクロールしていました。 MultiTouchDragStrategy.latestPointer を使用してデフォルトの ScrollBehavior を構成して、指の数に依存しないスクロール動作を実現できるようになりました。この変更の詳細については、移行ガイドを参照してください。

2本指でスクロールすると倍速になるやつを設定で変えられるっぽい...?
Flutterかどうかを確認する方法が1つ消えたのかも

ImajoImajo

Thanks to a contribution by Flutter community member @TahaTesser, Flutter has a new AnimationStyle widget that allows users to override the default animation behavior in widgets, such as MaterialApp, ExpansionTile, and PopupMenuButton, providing developers with the ability to override animation curves and durations.

翻訳: Flutter コミュニティ メンバーである @TahaTesser による貢献のおかげで、Flutter には新しいAnimationStyle ウィジェットが追加され、ユーザーがマテリアル アプリ、拡張タイル、ポップアップ メニュー ボタンなどのウィジェットのデフォルトのアニメーション動作をオーバーライドできるようになり、開発者がアニメーション カーブと持続時間をオーバーライドできるようになりました。

ExpansionTileをカスタムして独自で作ってたりしたので、する必要なくなるのかも?

ImajoImajo

Flutter community member @AcarFurkan added a styleFrom static utility method, just like the ones provided by the other button types. This method enables quickly creating a SegmentedButton’s ButtonStyle that can be shared with other segmented buttons or used to configure the app’s SegmentedButtonTheme.

翻訳: Flutter コミュニティのメンバー @AcarFurkan は、他のボタン タイプで提供されるものと同様に、styleFrom 静的ユーティリティ メソッドを追加しました。このメソッドを使用すると、他のセグメント化されたボタンと共有したり、アプリの SegmentedButtonTheme を構成するために使用したりできる SegmentedButton の ButtonStyle をすばやく作成できます。

SegmentedButtonをあまり使ってないので、直近では恩恵を受けなさそう...

ImajoImajo

Adaptive Switch

This adaptive component looks and feels native on macOS and iOS and has the Material Design look and feel elsewhere. It does not depend on the Cupertino library so its API is exactly the same on all platforms.
See the adaptive switch pull request and the live example on the Switch.adaptive constructor API page.

翻訳: このアダプティブ コンポーネントは、macOS および iOS ではネイティブな外観と操作感を持ち、他の場所ではマテリアル デザインの外観と操作感を持ちます。 Cupertino ライブラリに依存しないため、その API はすべてのプラットフォームでまったく同じです。
アダプティブ スイッチのプル リクエストと、Switch.adaptive コンストラクター API ページのライブ サンプルを参照してください。

これがSwitch.adaptiveのPR。
https://github.com/flutter/flutter/pull/130425

ImajoImajo

We have learned from developers that deep linking (taking users from a web URL to a specific page in a mobile app) has always been difficult to implement, and also error prone. So we first created a validation tool to help developers understand what links are incorrectly configured, and provide implementation guidance. We are very happy to share that an early version of the Flutter deeplink validator is now available!

翻訳: 私たちは開発者から、ディープ リンク (ユーザーを Web URL からモバイル アプリの特定のページに誘導すること) は実装が常に難しく、エラーが発生しやすいことを学びました。そこで私たちはまず、開発者がどのリンクが正しく設定されていないのかを理解し、実装に関するガイダンスを提供できるようにする検証ツールを作成しました。 Flutter ディープリンク バリデーターの初期バージョンが利用可能になったことをお知らせできることを非常にうれしく思います。

Deep linkの検証ツールができたっぽい。

ImajoImajo

Flutter text now looks a little more compact and a little more native on iOS. According to the Apple design guidelines, smaller fonts on iOS should be more spread out in order to be easier to read on mobile, while larger fonts should be more compact to not take up as much space. Before, we were incorrectly using the smaller, more spaced out font in all cases. Now, by default Flutter will use the compact font for larger text.

翻訳: Flutter テキストは、iOS 上でもう少しコンパクトになり、もう少しネイティブに見えるようになりました。 Apple のデザイン ガイドラインによると、iOS 上の小さいフォントはモバイルで読みやすくするためにより分散する必要があり、大きいフォントはスペースをあまりとらないようによりコンパクトにする必要があります。以前は、どのような場合でも、より小さくて間隔の広いフォントを誤って使用していました。現在、デフォルトでは、Flutter は大きなテキストにコンパクト フォントを使用します。

iOSフォント周りの調整

このスクラップは3ヶ月前にクローズされました