2021-03-01から1ヶ月間の記事一覧

矢印が移動しながら回転し、左側の横幅がそれに伴って変わる

NavigationRailだとカスタマイズが効かないので、 左メニューを自作できないかと試行錯誤中です。 今回は、メニューを開いたり閉じたりする部分を作ってみました。 NavigationRailも中身はConstrainedBoxなので、 minWidthをAnimationControllerで操作します…

useAnimationControllerとFractionalTranslationで矢印を右に移動する

import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; /// 矢印が右に移動するだけ void main() { runApp(Provi…

Flutter samples animations 03_animation_controllerをflutter_hooksで書き換える

書き換える前 https://github.com/flutter/samples/blob/master/animations/lib/src/basics/03_animation_controller.dart import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; void main() => runApp(MaterialApp…

use_of_void_result

このようなエラーメッセージが出ます。 This expression has a type of 'void' so its value can't be used. Try checking to see if you're using the correct API; there might be a function or call that returns void you didn't expect. Also check ty…

flutter_localizationsとfirebase_auth_web のintlのバージョンが合わない問題

Because firebase_auth_web 0.3.3 depends on intl ^0.16.1 and no versions of firebase_auth_web match >0.3.3 <0.4.0, firebase_auth_web ^0.3.3 requires intl ^0.16.1. And because every version of flutter_localizations from sdk depends on intl 0…

firestore: arrayの中のmapの特定の要素を削除する

無効なFCMトークンを削除する処理を書こうとしたときに調べました。 https://firebase.google.com/docs/firestore/manage-data/add-data#update_elements_in_an_array import * as admin from 'firebase-admin'; // serviceAccountを取得 import { getInitia…

firebase messaging.sendToDevice()をsinonで置き換える

https://firebase.google.com/docs/cloud-messaging/send-message?hl=ja#send-to-individual-devices 注: 1 つのリクエストでメッセージを送信できる宛先デバイスの最大数は 1,000 台です。配列に 1,000 を超える登録トークンを指定すると、そのリクエストは…