Skip to content

Instantly share code, notes, and snippets.

analyzer:
strong-mode:
implicit-casts: false
implicit-dynamic: true
errors:
# treat missing required parameters as a warning (not a hint)
missing_required_param: warning
# treat missing returns as a warning (not a hint)
missing_return: warning
todo: warning
import 'dart:convert';
import 'dart:io';
class Item {
Item({this.id, this.price, this.name});
Item.fromJson(Map<String, dynamic> json)
: this.id = json["id"],
this.price = json["price"],
this.name = json["name"];
class Item {
Item(price) {
this.price = price;
}
int price;
}
class Cart {
final items = [Item(1), Item(2)];
@TetsuFe
TetsuFe / main.dart
Last active June 27, 2020 05:56
Got an error: Uncaught Error: Unsupported operation: Platform._version
import 'dart:convert';
import 'dart:io';
void main() async {
final parsedUri =
Uri.parse('https://run.mocky.io/v3/ff312e74-ac17-49ee-9ce3-8638d7329917');
// DartPad error will be occured!
final myAccountRequest = await HttpClient().getUrl(parsedUri);
final myAccountResponse = await myAccountRequest.close();
final myAccountJsonString = await utf8.decodeStream(myAccountResponse);
import 'package:flutter_test/flutter_test.dart';
import 'package:mockito/mockito.dart';
import 'notice.dart';
import 'notice_api.dart';
import 'notice_bloc.dart';
class MockNoticeApi extends Mock implements NoticeApi {}
void main() {
group('notice', () {
# badge: ![Flutter CI](https://github.com/<username>/<repo>/workflows/Flutter%20CI/badge.svg)
name: Flutter CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
Future<List<dynamic>> fetchAllForChatListPage() async {
final url = BASE_URL + 'fetch_chat_list';
var response = await http.get(
url,
);
if (response.statusCode == 200) {
final body = jsonDecode(utf8.decode(response.bodyBytes)) as List<dynamic>;
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class Parent extends StatelessWidget{
EmailDomainChangeNotifier emailDomainChangeNotifier =
EmailDomainChangeNotifier();
@override
Widget build(BuildContext context) {
red 0-19 244-255
orange 20-51
yellow 52-83
green 84-115
miz 116-147
blue 148-179
purple 180-211
pink 212-243

今日作成するもの

つぶやきを投稿できるwebサイト。twitterよりも2chに近いかも。

今日使う開発環境について

  1. wifiに接続する(eduroamはダメです!HINES-WLANにしてください)
  2. Google ChromeまたはSafariで以下のページにアクセス   cloud9   https://c9.io/  
  3. 右上にある(隠れている時もある)sign inボタンを押して、メールアドレスとパスワードを入力(今から教えます)