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
xcrun agvtool new-version -all {new_build_number} |
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
agvtool mvers -terse | grep /Info.plist | cut -f 2 -d "=" |
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
extension ListEx<E> on List<E> { | |
List<E> separated(E separator) { | |
return List<E>.generate(length * 2 - 1, (index) { | |
final idx = index ~/ 2; | |
return index.isEven ? this[idx] : separator; | |
}); | |
} | |
} |
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
class Handler { | |
Handler({ | |
this.increment, | |
}); | |
final VoidCallback increment; | |
} | |
class MyApp extends StatelessWidget { | |
@override |
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
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
final store = Store<AppState>( | |
reducer, | |
initialState: AppState.init(), | |
); | |
return MaterialApp( | |
title: 'Flutter Demo', | |
theme: ThemeData( |
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
class MyHomePage extends StatelessWidget { | |
const MyHomePage({Key key}) : super(key: key); | |
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
appBar: AppBar( | |
title: Text('Demo'), | |
), | |
body: Center( |
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
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
title: 'Flutter Demo', | |
theme: ThemeData( | |
primarySwatch: Colors.blue, | |
), |
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 navigatorKey = GlobalKey(); | |
// ... | |
// Widget構成時 | |
Navigator( | |
key: navigatorKey, | |
onGeneratedRoute: (settings) => route, | |
); |
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
static NavigatorState of( | |
BuildContext context, { | |
bool rootNavigator = false, | |
bool nullOk = false, | |
}) { | |
final NavigatorState navigator = rootNavigator | |
? context.rootAncestorStateOfType(const TypeMatcher<NavigatorState>()) | |
: context.ancestorStateOfType(const TypeMatcher<NavigatorState>()); | |
assert(() { | |
if (navigator == null && !nullOk) { |
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 controller = ItemScrollController(); | |
final listener = ItemPositionsListener.create(); | |
ScrollablePositionedList.builder( | |
itemCount: _maxItemCount, | |
itemScrollController: controller, | |
itemPositionsListener: listener, // ItemPositionsListenerでスクロールを監視 | |
itemBuilder: (context, index) { | |
return child; | |
}, |
NewerOlder