This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// 例: https://github.com/Atsumi3/AppManager | |
/// const _GITHUB_OWNER = "Atsumi3"; | |
/// const _GITHUB_REPOSITORY = "AppManager"; | |
const _GITHUB_OWNER = ""; | |
const _GITHUB_REPOSITORY = ""; | |
/// Permission: Read and Write -> actions variables and secrets | |
const _GITHUB_PAT = ""; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Description: AppStoreとGooglePlayの審査結果をSlackに通知する | |
// ポスト先のSlack Channel名 | |
const SLACK_CHANNEL_NAME = ""; | |
// https://hooks.slack.com/services/XXX/YYY/ZZZ | |
const SLACK_WEBHOOK_URL = ""; | |
const MAX_BODY_LENGTH = 200; | |
const GOOGLE_APP_NAME = ""; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:async'; | |
import 'dart:convert'; | |
import 'package:firebase_core/firebase_core.dart'; | |
import 'package:firebase_messaging/firebase_messaging.dart'; | |
import 'package:flutter/cupertino.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter_local_notifications/flutter_local_notifications.dart'; | |
import 'package:flutter_riverpod/flutter_riverpod.dart'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:async'; | |
class Router {} | |
final _controller = StreamController<Router>.broadcast(); | |
/// [Router]イベントを監視するmixin | |
mixin RouteEventObserver<R extends Router> { | |
StreamSubscription<Router>? _subscription; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final logger = Logger( | |
output: CrashlyticsLogger(), | |
printer: PrettyPrinter( | |
methodCount: 1, | |
errorMethodCount: 5, | |
dateTimeFormat: DateTimeFormat.onlyTimeAndSinceStart, | |
), | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# 以下のようなディレクトリ構成で作成されているプロジェクト用 | |
# pubspec.yaml | |
# lib/src/aaa/bbb.dart | |
if [ ! -f pubspec.yaml ]; then | |
echo "このスクリプトはDartパッケージのルートディレクトリで実行してください。pubspec.yamlが見つかりません。" | |
exit 1 | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# GraphQLの関数実装漏れをチェックするスクリプト | |
# | |
# 例えば、以下のようなスキーマファイルがある場合 | |
# | |
# // schema.graphql | |
# type Mutation { | |
# postUser(name: String!): User! | |
# } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# based: https://stackoverflow.com/a/67000032 | |
# ghコマンドのセッションチェック | |
gh auth status >/dev/null | |
if [ $? -ne 0 ]; then | |
echo "Please login to GitHub with gh command." | |
exit 1 | |
fi | |
# org, repo を引数から取得する |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
PUBSPEC_FILE_NAME='pubspec.yaml' | |
echo '------------------------------------' | |
echo '-- flutter clean' | |
echo $(pwd) | |
# .dart_tool を除いたプロジェクトフォルダ内の $PUBSPEC_FILE_NAME が格納されているディレクトリ一覧を取得 | |
PUB_SPEC_DIRS=$(find "$(pwd)" \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Suppress("DEPRECATION") | |
@SuppressLint("PackageManagerGetSignatures") | |
fun getSignature(algorithm: String): String { | |
fun byteArrayToReadableString(array: ByteArray, delimiter: String = ":"): String { | |
return array.joinToString(delimiter) { | |
var str = Integer.toHexString(it.toInt()) | |
str = (if (str.length == 1) "0$str" else str).replace("ff", "") | |
if (str.isEmpty()) str = "FF" | |
str.uppercase(Locale.getDefault()) | |
} |
NewerOlder