This file contains 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains 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 'package:flutter/material.dart'; | |
import 'package:flutter_test/flutter_test.dart'; | |
void main() { | |
late Widget testWidget; | |
// 読み込み時に実行 | |
setUp(() { | |
testWidget = MaterialApp( | |
home: Scaffold( |
This file contains 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 'package:flutter/services.dart'; | |
import 'package:flutter_test/flutter_test.dart'; | |
// フォントの読み込み | |
Future<void> loadJapaneseFont() async { | |
TestWidgetsFlutterBinding.ensureInitialized(); | |
final binary = rootBundle.load('assets/fonts/NotoSansJP-Black.otf'); | |
final loader = FontLoader('Roboto')..addFont(binary); | |
await loader.load(); | |
} |
This file contains 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
// フォームのフォーカスを外す | |
FocusManager.instance.primaryFocus?.unfocus(); |
This file contains 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
late Widget testWidget; | |
final appRouter = AppRouter(); | |
// 読み込み時に実行 | |
setUp(() { | |
testWidget = ProviderScope( | |
child: MediaQuery( | |
data: MediaQueryData(), | |
child: ScreenUtilInit( | |
designSize: const Size(375, 812), |
This file contains 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 scrollableWidget = find.byType(SingleChildScrollView).first; | |
await tester.drag(scrollableWidget, const Offset(0, -5000)); | |
await tester.pumpAndSettle(); |
This file contains 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 baseInfoDataController = ProviderScope.containerOf( | |
widgetTester.element(find.byType(MaterialApp))) | |
.read(baseInfoRegisterDataProvider.notifier); |
This file contains 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
<?php | |
include('./api_key.php'); | |
class SentenceSummaryChatGPT { | |
private $header = array(); | |
// ChatGPT APIエンドポイント | |
private $endpoint = 'https://api.openai.com/v1/chat/completions'; |
This file contains 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
FROM jupyter/scipy-notebook |
OlderNewer