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 Home extends StatefulWidget { | |
const Home({Key? key}) : super(key: key); | |
@override | |
State<StatefulWidget> createState() => HomeState(); | |
} | |
class HomeState extends State<Home> with WidgetsBindingObserver { |
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:flutter/material.dart'; | |
void main() { | |
runApp(const MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
const MyApp({Key? key}) : super(key: key); | |
@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:flutter/material.dart'; | |
void main() { | |
runApp(const MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
const MyApp({Key? key}) : super(key: key); | |
@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
void main() { | |
runApp(const TextThemeTestApp()); | |
} | |
class TextThemeTestApp extends StatelessWidget { | |
const TextThemeTestApp({Key? key}) : super(key: key); | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( |
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
showDialog( | |
context: context, | |
builder: (context) { | |
return AlertDialog( | |
content: Column( | |
mainAxisSize: MainAxisSize.min, | |
children: const [ | |
CircularProgressIndicator(), | |
Text('λ‘λ© μ€...'), | |
], |
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
void main() { | |
List<int> list1 = [1, 3, 2, 4]; | |
List<int> list2 = [...list1, 4, 5]; | |
List<int>? listNull; | |
list2 = [...list2, ...?listNull]; | |
print(list2); | |
Set<int> set1 = {1, 3, 2, 4}; |
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
void main() { | |
// μλ¬ λ°μ λΆλΆ | |
OwnImage image = | |
ImageMaker()..setShape('circular')..setUrl('image path')..build(); | |
/* μ€μ λ‘ μλμ κ°μ μ½λκΈ° λλ¬Έ | |
OwnImage image = ImageMaker(); | |
image.setShape('circular'); | |
image.setUrl('image path'); | |
image.build(); |
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
public class DiTest { | |
public static void main(String[] args) { | |
A a = new A(new B1()); | |
a.hi(); | |
a.changeDependency(new B2()); | |
a.hi(); | |
} | |
} | |
class A { |
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 CustomScrollBehavior extends ScrollBehavior { | |
// Android | |
@override | |
Widget buildOverscrollIndicator(BuildContext context, Widget child, ScrollableDetails details) => child; | |
// iOS | |
@override | |
ScrollPhysics getScrollPhysics(BuildContext context) => const ClampingScrollPhysics(); | |
} |
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:io'; | |
if (Platform.isAndroid) { | |
} else if (Platform.isIOS) { | |
} |