Quantcast
Channel: 万年素人からHackerへの道

dio 基本的なリクエスト(CORS対応ヘッダー追加)

import 'package:dio/dio.dart'; void main() async {  var dio = Dio();   // リクエストヘッダーの設定(ブラウザのリクエストを模倣)  dio.options.headers = {    'Origin': 'http://localhost:3000', // フロントエンドのオリジンを指定...

View Article


flutter_sensorsでの端末取得

Flutterで横右か左かに倒したかどうかの判定 古いがflutter_sensorsは使いにくいimport 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_sensors/flutter_sensors.dart'; import...

View Article


RiverpodのGlobalKey

@Riverpod(keepAlive: true) GlobalKey<NavigatorState> navigatorKey(Ref ref) { return GlobalKey<NavigatorState>(debugLabel: 'root'); }

View Article

riverpodでタイマー

何度もタイマーで生きてしまう。 仕方ないので ref.onDispose(() {をした。 また今のタイマーを myTimerで state対象にしたimport 'dart:async'; import 'package:riverpod_annotation/riverpod_annotation.dart'; part 'current_position_service.g.dart';...

View Article

Flutterプロジェクトでのインポートの書き方修正

package:でインポートしたいhttps://zenn.dev/ymgn____/articles/b91456bc45736danalysis_options.yamlにルール。include: package:pedantic_mono/analysis_options.yaml analyzer: exclude: - '**/*.g.dart' linter: rules: -...

View Article


flutter_ttsにてマナーモードで音が出ない

flutter_ttsにてマナーモードで音が出ない。バージョンはこれ。flutter_tts: ^4.2.1https://github.com/dlutton/flutter_tts/issues/458での「mijiga on Apr 10, 2024」を参考にした。 // TTSインスタンス final FlutterTts _flutterTts = FlutterTts(); //...

View Article

rivepodでintだけ扱うやつ

取得しないでsetするだけなのにimport 'package:riverpod_annotation/riverpod_annotation.dart'; part 'tab_index_provider.g.dart'; /// タブ管理 @riverpod class TabIndex extends _$TabIndex { @override int build() => 0;...

View Article

flutterでフォルダを別に

g系のファイル置換元part\s+'([^']+\.g\.dart)';置換先part 'generated/$1';freeze系のファイル置換元part\s+'([^']+\.freezed\.dart)';置換先part 'generated/$1';設定 build.yaml # freezedでの設定 freezed: generate_for: include: -...

View Article


avoid_unused_parametersを使う

pyramid_lintにあるfvm dart pub add dev:custom_lint dev:pyramid_lintanalysis_options.yamlinclude: package:very_good_analysis/analysis_options.yaml analyzer: exclude: - '**/*.g.dart' plugins: - custom_lint...

View Article


Image may be NSFW.
Clik here to view.

pub.devのunverified uploader

unverified uploaderになっている。Google Search Consoleの導入方法ってのがあるhelp.hatenablog.comここでいけそう

View Article

location プラグイン Flutter

locationプラグイン(geolocator ではなく location)を使う場合、バックグラウンドでも位置情報を取得するには以下の点に注意が必要です。1. location プラグインのバックグラウンド対応location プラグインでは enableBackgroundMode(true) を呼び出すことで、バックグラウンドでの位置情報取得が可能になります。2....

View Article

zigとzigmodとzigzap入れれる

brew install ziggit clone https://github.com/nektro/zigmod.git cd zigmod zig build mkdir -p ~/.local/bin # 実行可能ファイルのディレクトリを作成 mv zig-out/bin/zigmod ~/.local/bin/zig fetch --save...

View Article

ReactNativeを使う

npmでのインストール yarnのほうがいいかもしれないが・・・npx react-native init app_name --legacy-peer-deps Need to install the following packages: react-native@0.78.0 Ok to proceed? (y) y npm ERR! code ERESOLVE npm ERR!...

View Article


git tagのリネーム

リネームはできないのでそれぞれの新規を作るgit tag v1.0.12 1.0.12 git tag v1.0.13 1.0.13 git tag v1.0.14 1.0.14リモートプッシュgit push origin v1.0.12 v1.0.13 v1.0.14

View Article

fly.ioにデプロイ

https://fly.io/Fishでパス通すset -Ux FLYCTL_INSTALL $HOME/.fly set -Ux PATH $FLYCTL_INSTALL/bin $PATHset: successfully set universal 'PATH'; but a global by that name shadows itglobalだとその場限りっぽい 一方 universal...

View Article


Masonのブリック

Flutterのコード生成のやつ あれメイソンって読むのかMason(メイソン)には、次のような意味があります。 石工、タイル工、レンガ職人 石やレンガで建てる 熟練の石工Clean Architecture Template (CAT) by SamuelGadiel...

View Article

flutter_templateを使ったMason

https://github.com/wednesday-solutions/flutter_template初期化mason initmason add destination \ --git-url https://github.com/wednesday-solutions/flutter_template \ --git-path bricks/destinationでも⠦...

View Article


Image may be NSFW.
Clik here to view.

Osmo Action 5 Proの中国語コマンド

开始录像(録画を開始する)  → kāi shǐ lù xiàng停止录像(録画を停止する)  → tíng zhǐ lù xiàng拍张照片(写真を撮る)  → pāi zhāng zhào piàn关闭相机(カメラをオフにする)  → guān bì xiàng jīDJI 1年延長プレミアムサポート(Osmo Action 5 Pro)DJIAmazonDJI Osmo Action 5...

View Article

dataconnect Firebase

> firebase init dataconnectの後の結果のメモ ######## #### ######## ######## ######## ### ###### ######## ## ## ## ## ## ## ## ## ## ## ## ###### ## ######## ###### ######## ######### ###### ###### ## ## ##...

View Article

Firebaseのdataconnect エラー

> firebase init dataconnectの後の結果のメモ ######## #### ######## ######## ######## ### ###### ######## ## ## ## ## ## ## ## ## ## ## ## ###### ## ######## ###### ######## ######### ###### ###### ## ## ##...

View Article

VSCodeでのFirebase Data Connect

dataconnect/default-connector/connector.yamlこんな感じにしないとdartのコード自動生成が動かないconnectorId: "default-connector" authMode: "PUBLIC" generate: dartSdk: outputDir: "../../lib/generated" # 出力先をFlutterプロジェクトに合わせて調整...

View Article


Image may be NSFW.
Clik here to view.

Firebase Data Connect -ユーザーログインなしでやる方法

以下のコマンドで初期化firebase init dataconnectGraphQLのファイル群dataconnect/ ├── dataconnect.yaml ├── default-connector │   ├── connector.yaml │   ├── mutations.gql │   └── queries.gql └── schema └──...

View Article


Fighter Command Beautifierのプライバシーポリシー

プライバシーポリシーFighter Command Beautifier(以下「本拡張機能」)は、ユーザーのプライバシーを尊重し、以下のポリシーに従って運営されます。データの収集 本拡張機能は、以下のデータを収集します:表示されているウェブページのテキスト(コマンド表記の変換のため)データの使用 収集したデータは、以下の目的でのみ使用されます:コマンド表記の変換処理変換結果の表示データの保存と送信...

View Article

やってみて様子を見よう

Let's see how you go. Let's see what you can do. Let's see how it goes.誰かが新しいことに挑戦するとき: "Alright, you try driving. Let’s see how you go."「じゃあ運転してみて。うまくできるか見てみよう。」少し試してみる提案をするとき: "Let’s not decide yet....

View Article

Image may be NSFW.
Clik here to view.

GodotのiOSエクスポート設定系

iOSでエクスポートはプロジェクト→エクスポート iOSオフラインモードになっていてiOSのエクスポート用のプロジェクトをダウンロードできない時 Godot→エディター設定 「プロジェクト→プロジェクト設定」ではない!!のでハマった そこにもネットワーク設定があるのでゆるっとはじめる Godot Engine ゲームプログラミング作者:杉山悠真文彩堂出版Amazon

View Article


countyとは?

County (郡)の意味っぽいが An area in a country or state that has its own local government. の定義日本は2層構造なのでcountyがない Country Structure Type Level 1 Level 2 Level 3 Notes 🇯🇵 Japan Two-tier Prefecture (都道府県)...

View Article

世界一小さなバイオリンの英語表現

"Can you hear the world’s smallest violin playing just for you?"「世界一小さなバイオリンがあなたのために悲しいメロディを奏でてるよ〜(棒読み)」

View Article

dSYMのエラー

Xcode Archiveしてバリデーションしたら出るUpload Symbols Failed The archive did not include a dSYM for the GoogleMobileAds.framework with the UUIDs [A19D8930-6077-34AC-A014-2CDAC293A19B]. Ensure that the archive's...

View Article

gitのステージングのやつらリセット

git diff --cached --name-status | awk '{print $2}' | xargs -I{} sh -c 'git reset HEAD "{}"; git checkout -- "{}"'git statusでステージングにあるやつら全部リセット 新しいのなら削除、そうじゃないのならリセット

View Article