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
ta test async | |
test( | |
'should $ACT$ when $END$', | |
() async { | |
// arrange | |
// act | |
// assert |
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
<templateSet group="user"> | |
<template name="imf" value="import 'package:flutter/material.dart';" description="Import flutter material" toReformat="false" toShortenFQNames="true"> | |
<context> | |
<option name="DART" value="true" /> | |
</context> | |
</template> | |
<template name="fblo" value="import 'dart:async'; import 'package:bloc/bloc.dart'; class $name$Bloc extends Bloc<$event$, $state$> { @override $name$State get initialState => null; @override Stream<$name$State> mapEventToState($state$ currentState, $event$ event) { $cursor$ return null; } }" description="flutter bloc class template" toReformat="false" toShortenFQNames="true"> | |
<variable name="name" expression="" defaultValue="" alwaysStopAt="true" /> | |
<variable name="event" expression="" defaultValue="" alwaysStopAt="true" /> | |
<variable name="state" expression="" defaultValue="" alwaysStopAt="true" /> |
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
export PS1='$ ' | |
export PS1='$ ' | |
export PS1='\W $ ' | |
export EDITOR=nano | |
export VISUAL='$EDITOR' | |
export PATH=$PATH:~/Library/Android/sdk/platform-tools:~/soft/flutter/bin/cache/dart-sdk/bin:~/soft/flutter/bin:/usr/local/opt/openssl/bin | |
alias hs='history' | |
alias ll='ls -lah' | |
alias ga='git add .' |
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
class CounterState { | |
final int counter; | |
CounterState._(this.counter); | |
factory CounterState.nextState(int times) => CounterState._(times); | |
} | |
class CounterBloc extends Bloc<CounterEvent, CounterState> { | |
@override | |
CounterState get initialState => CounterState.nextState(0); |
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
# add path example | |
echo 'export PATH="$PATH:/usr/lib/dart/bin"' >> ~/.bashrc | |
source .bashrc | |
# install dart https://www.dartlang.org/tools/sdk#install |
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
Iterable<int> range({int from = 0, int to}) sync* { | |
for (int i = from; i < to; ++i) { | |
yield i; | |
} | |
} |
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 'package:bloc/bloc.dart'; | |
import 'package:tps_mobile_combined_maximo_app/data/model/user_state/member_user_state.dart'; | |
import 'package:tps_mobile_combined_maximo_app/data/repositories/local_storage.dart'; | |
import 'package:tps_mobile_combined_maximo_app/global/bloc/export.dart'; | |
class GlobalBloc extends Bloc<GlobalEvent, GlobalState> { | |
@override | |
GlobalState get initialState => GlobalStateUnauthenticated(); | |
@override |
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 'package:meta/meta.dart'; | |
import 'package:tps_mobile_combined_maximo_app/global/bloc/export.dart'; | |
@immutable | |
abstract class GlobalState {} | |
class GlobalMessageState extends GlobalState{ | |
final GlobalMessage message; | |
GlobalMessageState(this.message); |
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 'package:bloc/bloc.dart'; | |
import 'package:tps_mobile_combined_maximo_app/claims/create_clame/bloc/export.dart'; | |
import 'package:tps_mobile_combined_maximo_app/data/model/claims/claim_co.dart'; | |
import 'package:tps_mobile_combined_maximo_app/data/repositories/local_storage.dart'; | |
import 'package:tps_mobile_combined_maximo_app/global/bloc/export.dart'; | |
class CreateClaimBloc extends Bloc<CreateClaimEvent, CreateClaimState> { | |
final GlobalBloc globalBloc; | |
CreateClaimBloc(this.globalBloc); |
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 'package:simple_playground/algo/find_circle_road.dart'; | |
void main() { | |
print(findCircularRoad(input1)); | |
print(findCircularRoad(input2)); | |
print(findCircularRoad(input3)); | |
print(findCircularRoad(input4)); | |
} |