(Mac)command + 7で選択し、 Shift + optionを押下しながら右下の角をドラッグする。
あとはSelected Exportで出力する
https://stackoverflow.com/questions/59516408/flutter-app-stuck-at-running-gradle-task-assembledebug
export JAVA_HOME=`/usr/libexec/java_home -v 1.8`
cd android ./gradlew clean ./gradlew build
[1, 2, 23, 33];
は
String
の配列になる
["1", "2", "23", "33"];
しかも、値が1つのときは、Stringになるっぽい
["2"]
は
"2"
FiresoreのTimeStampはこのとうに無理やり変換??
newData['profile.birthday'] = newData.profile['birthday']['_seconds'];
こんな値は使えない。
newData['test'] = { 'a': 1, };
Firestoreの配列はなぜかobjectなのでこんな感じに無理やり変換 これはおおげさ
newData['array_prop'] = Object.values<Number>(newData['array_prop']).map((item: any) => parseInt(item));
これでいいかもNumber
にならないけど
newData['array_prop'] = Object.values<Number>(newData['array_prop']);
Map<int, List<int>> favoritePlaces;
な変数
がある。
intのキー指定してnullなら初期化してaddできるようにしたいが・・。
if (favoritePlaces[location]?.contains(index) ?? false) { favoritePlaces[location].remove(index); } else { // なければList<int>初期化 if (favoritePlaces[location] == null) { print(favoritePlaces.runtimeType); favoritePlaces[location] = <int>[]; } favoritePlaces[location].add(index); }
CastMap<String, dynamic, int, List
════════ Exception caught by gesture ═══════════════════════════════════════════════════════════════ The following _CastError was thrown while handling a gesture: type 'int' is not a subtype of type 'String' in type cast