flutter
qiita.com これいいね。 最近Flutterのだと動かないので、 loading.dart を以下のように修正 import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; class Loader extends StatefulWidget { final Color color; final Duration…
This app is using a deprecated version of the Android embedding. To avoid unexpected runtime failures, or future build failures, try to migrate this app to the V2 embedding. Take a look at the docs for migrating an app: https://github.com/…
Navigator.of(context).pushAndRemoveUntil( MaterialPageRoute<HogePage>( builder: (context) => const HogePage(), ), (Route<dynamic> route) => false, ), E/flutter ( 7164): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Navigator operati</dynamic></hogepage>…
android/app/src/main/AndroidManifest.xml activity配下ではない!!! [flutter] FCM で バックグラウンド時の通知アイコンが表示されない時のつまづき <meta-data android:name="com.google.firebase.messaging.default_notification_channel_id" android:value="@string/default_notification_channel_id" /> </meta-data>
今更ながらFlutterの画面遷移にNavigator 2.0なるものがあった。 状態の変化で遷移するものっぽい。
バッジのパッケージアニメを切る badges.Badge( badgeAnimation: const badges.BadgeAnimation.slide( toAnimate: false, ),
コンストラクタで BottomNavigation({ Key? key, }) : super(key: key); が BottomNavigation({ super.key, }); https://dart-lang.github.io/linter/lints/use_super_parameters.html
import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; void main() { // ログ出力のフォーマットを設定する if (!kReleaseMode) { debugPrint = (String? message, {int? wrapWidth…
import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; void main() { // ログ出力のフォーマットを設定する if (!kReleaseMode) { SystemChannels.platform.setMethodCallHandler((…
クリーンアーキテクチャに基づいたFlutterアプリの雛形を作成するには、以下の手順に従うことができます。 プロジェクトを作成する Flutterコマンドラインツールを使用して、新しいFlutterプロジェクトを作成します。例えば、以下のコマンドを使用することが…
それぞれのパッケージには、異なる目的と機能があります。 amplify_flutter: これは、Amplifyフレームワーク全体を使用するための基本的なパッケージです。amplify_flutterパッケージを使用することで、Amplifyの機能(認証、API、ストレージなど)を簡単に…
SKPaymentQueueWrapper().addPayment と buyConsumable は、iOSアプリ内課金(In-App Purchase)の実装に関連する用語です。それぞれの違いを理解するために、両方の概要を説明します。 SKPaymentQueueWrapper().addPayment: SKPaymentQueueWrapper は、SKPa…
Android環境では、IAPErrorのcodeは、BillingClient.BillingResponseCodeに対応するエラーコードを表す文字列になります。ただし、これらのエラーコードは整数ではなく、文字列に変換されます。 例えば、BillingClient.BillingResponseCode.USER_CANCELED(…
warning: Warning in the included options file /Users/user/.pub-cache/hosted/pub.dev/pedantic_mono-1.20.1/lib/analysis_options.yaml(1551..1568): 'invariant_booleans' is a deprecated lint rule and should not be used (included_file_warning at…
例えばKotlinでは queryPurchases を使ってますが、 プラグインでは、 queryPastPurchases メソッドを使用するみたいなんですが、 InAppPurchaseConnectionインスタンスがない。 その中に * The `InAppPurchaseConnection.queryPastPurchases` method has be…
公式WebViewプラグインの邪魔なエラー。最新だがな! 「updateAcquireFence: Did not find frame」というエラーは、Flutterのオフィシャルプラグインを使用している場合に、Androidでよく発生する問題の1つです。このエラーは、アプリケーションがフレームバ…
// スタック内のルートのリストを取得する var routes = List<MaterialPageRoute>.from(Navigator.of(context).routes); // スタック内の既存のルートを特定する var oldRoute = routes.firstWhere((route) => route.settings.name == '/old_screen'); // スタック内の既存のル</materialpageroute>…
確かに、アプリ全体の初期化処理の中でトランザクションオブザーバを設定する場合、購入情報を処理するコードとの間にアクセスの障壁が生じる可能性があります。 この問題を解決するために、以下のような方法があります。 import 'package:in_app_purchase/i…
Trying to add a payment without an observer. One must be set using `SkPaymentQueueWrapper.setTransactionObserver` before the app launches.
in_app_purchase_storekitのpaymentQueueはどうやって呼び出しますか? ChatGPTそのまま。 in_app_purchase_storekitは、Flutterアプリでアプリ内課金機能を実装するために使用されるライブラリです。このライブラリには、paymentQueueを呼び出す必要はあり…
GitHub - flutter/packages: A collection of useful packages maintained by the Flutter team ↑このFlutterの公式プラグインはpackageに詰まりまくっていて不便・・・。 Forkしていじりたいが、 https://github.com/flutter/packagesは色々詰まってるのだ…
┌─ Flutter Fix ─────────────────────────────────────────────────────────────────────────────────┐ │ The plugin firebase_analytics requires a higher Android SDK version. │ │ Fix this issue by adding the following to the file │ │ /Users/shin…
const RouteSettings().copyWith(name: routeName, arguments: arguments), でエラーになった。 error: The method 'copyWith' isn't defined for the type 'RouteSettings'. (undefined_method at [アプリ名]〜 は?? docs.flutter.dev RouteSettings newS…
Image.networkのボタンで押下時にグレーのもの import 'package:flutter/material.dart'; class GrayScaleButton extends StatefulWidget { const GrayScaleButton({ Key? key, required this.imageUrl, required this.onPressed, }) : super(key: key); fin…
HookConsumerWidgetを継承したクラス内で void _close() { final context = useContext(); Navigator.of(context).pop(); } みたいなメソッド作った。 呼ぶ場所によっては useContext で以下のエラー [VERBOSE-2:dart_vm_initializer.cc(41)] Unhandled Exce…
TextFieldにフォーカスしたときにあるウィジットをColumn の配下にあるあるウィジットを以下のように消していた。 if (消すときはtrue、表示したいときはfalse) 消していたWidget しかし、この非表示になったときにTextFieldにのフォーカスが外れる・・・。 …
TextFieldとCupertinoTextFieldとで onChangedのref.readの挙動が違う? final _textProvider = StateProvider.autoDispose((ref) => ''); を定義。 TextFieldとCupertinoTextFieldで以下のように設定 TextField( // ~~~~略 onChanged: (text) { _handleText…
pubspec.yamlを更新した。 - realm: ^0.4.0+beta + realm: ^1.0.2 モデルファイルはそのままで行けないので、 以下で再生成した。 flutter pub run realm generate realmはrealm.Realm?なインスタンスが格納されているとする そうしたら次は、以下のようにqu…
Null check operator used on a null value なるエラーがFadeInImage.assetNetworkで発生 @override Widget build(BuildContext context) { final copiedUrl = imageUrl; if (copiedUrl == null || copiedUrl.isEmpty) { } else { print('おかしいかい?'); …
class CurrentIndexNotifier extends StateNotifier<int> { CurrentIndexNotifier() : super( // 初期値として適当なデータを入れています 0, ); void setIndex(int index) { state = index; } } final currentIndexProvider = StateNotifierProvider<CurrentIndexNotifier, int>((ref) { ret</currentindexnotifier,></int>…