Developments/Flutter

Flutter/Package] firebase_remote_config

Meuse 2022. 11. 16. 12:19
반응형

 

 

firebase_remote_config | Flutter Package

Flutter plugin for Firebase Remote Config. Update your application look and feel and behavior without re-releasing.

pub.dev

 

  import 'package:firebase_remote_config/firebase_remote_config.dart';
  
  Future<int> getLatestVersion() async {
    final FirebaseRemoteConfig remoteConfig = FirebaseRemoteConfig.instance;
    await remoteConfig.setConfigSettings(RemoteConfigSettings(
        fetchTimeout: const Duration(seconds: 10),
        minimumFetchInterval: const Duration(minutes: 30)));
    remoteConfig.fetchAndActivate();
    return remoteConfig.getInt('latest_version');
  }

 

Error] setConfigSettings 앞에 await 없으면 발생하는 오류 (처음엔 없다가 나중에 나타남)

[VERBOSE-2:dart_vm_initializer.cc(41)] Unhandled Exception: [firebase_remote_config/internal] 취소됨
#0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:653:7)
#1      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:296:18)
<asynchronous suspension>
#2      MethodChannelFirebaseRemoteConfig.fetchAndActivate (package:firebase_remote_config_platform_interface/src/method_channel/method_channel_firebase_remote_config.dart:150:29)
<asynchronous suspension>
#3      FirebaseRemoteConfig.fetchAndActivate (package:firebase_remote_config/src/firebase_remote_config.dart:87:26)
<asynchronous suspension>

 

반응형

'Developments > Flutter' 카테고리의 다른 글

Flutter/Widget] Tabbar  (0) 2022.12.02
Flutter/Package] image_picker  (0) 2022.11.16
Flutter] Localizations  (0) 2022.11.07
Widget] Cupertino - Tab Bar  (0) 2022.08.03
Widget] Material - Bottom Navigation Bar  (0) 2022.08.03