Slide 1

Slide 1 text

1 FlutterͰݸਓతʹͭ·ͬͨͱ͜Ζͱ ࣗ෼ͳΓͷղܾࡦ Flutter Meetup Tokyo #12 2019.11.7

Slide 2

Slide 2 text

ࣗݾ঺հ • ໊લɿؙ໨༗ً • Flutterྺɿ3ϲ݄ʢࣾ಺޲͚ΞϓϦʣ • ৬छɿAndroidʢϚϯΨΞϓϦʣ • झຯɿےτϨ • Twitterɿ@marudroid 2

Slide 3

Slide 3 text

໨࣍ 3 ᶃը໘ͷೖΕସ͑ ᶄGridViewͷΞΠςϜʹը૾ʢαʔόʔ্ʣؚ͕·Ε͍ͯ Δͱ͖ʹɺը૾ΛΞΠςϜͷαΠζ͍ͬͺ͍·Ͱ޿͍͛ͨ ᶅ͋Δը໘ͷ্ʹഎܠ͕൒ಁ໌ͷը໘Λද͍ࣔͨ͠

Slide 4

Slide 4 text

໨࣍ 4 ᶃը໘ͷೖΕସ͑ ᶄGridViewͷΞΠςϜʹը૾ʢαʔόʔ্ʣؚ͕·Ε͍ͯ Δͱ͖ʹɺը૾ΛΞΠςϜͷαΠζ͍ͬͺ͍·Ͱ޿͍͛ͨ ᶅ͋Δը໘ͷ্ʹഎܠ͕൒ಁ໌ͷը໘Λද͍ࣔͨ͠

Slide 5

Slide 5 text

5 A B

Slide 6

Slide 6 text

6

Slide 7

Slide 7 text

Navigator.pushReplacement( context, MaterialPageRoute( builder: (context) => SamplePage())); 7

Slide 8

Slide 8 text

8 ࢥͬͨ௨Γʹಈ͔ͳ͍ɾɾ

Slide 9

Slide 9 text

9 ϧʔτͷը໘Ͱ͔͠ಈ͔ͳ͍

Slide 10

Slide 10 text

10 Navigator.push( context, MaterialPageRoute( builder: (context) => SamplePage()));

Slide 11

Slide 11 text

11 Navigator.push( context, MaterialPageRoute( builder: (context) => SamplePage())); Navigator.of(context).popUntil((route) => route.isFirst);

Slide 12

Slide 12 text

12 https://stackoverflow.com/questions/51484032/ flutter-navigation-push-replacement-is-not- working-when-not-placed-in-the-first

Slide 13

Slide 13 text

໨࣍ 13 ᶃը໘ͷೖΕସ͑ ᶄGridViewͷΞΠςϜʹը૾ʢαʔόʔ্ʣؚ͕·Ε͍ͯ Δͱ͖ʹɺը૾͕খ͘͞ͳΔ ᶅ͋Δը໘ͷ্ʹഎܠ͕൒ಁ໌ͷը໘Λද͍ࣔͨ͠

Slide 14

Slide 14 text

(PPE #BE 14 ը૾͕খ͘͞ͳͬ ͍ͯΔ

Slide 15

Slide 15 text

15 ը૾Λϩʔυ͢ΔલͷϨϯμϦϯά͞Εͨ࣌఺ͷαΠζͰݻఆ͞Ε ͍ͯͯɺը૾͕ಡΈࠐ·ΕΔͱͦͷαΠζͷൣғ಺Ͱදࣔ͠Α͏ͱ ͢Δ

Slide 16

Slide 16 text

16 ͋Β͔͡ΊαΠζΛܾΊͯ͠·͏

Slide 17

Slide 17 text

17 GridView.count( padding: EdgeInsets.only(left: 36, top: 18), physics: ScrollPhysics(), crossAxisCount: 2, shrinkWrap: true, childAspectRatio: 0.7, ΞΠςϜͷΞεϖΫτൺΛࢦఆ͓ͯ͘͠

Slide 18

Slide 18 text

໨࣍ 18 ᶃը໘ͷೖΕସ͑ ᶄGridViewͷΞΠςϜʹը૾ʢαʔόʔ্ʣؚ͕·Ε͍ͯ Δͱ͖ʹɺը૾ΛΞΠςϜͷαΠζ͍ͬͺ͍·Ͱ޿͍͛ͨ ᶅ͋Δը໘ͷ্ʹഎܠ͕൒ಁ໌ͷը໘Λද͍ࣔͨ͠

Slide 19

Slide 19 text

19

Slide 20

Slide 20 text

20 showGeneralDialog( context: context, barrierColor: Colors.black12.withOpacity(0.6),

Slide 21

Slide 21 text

21 എܠਅͬനʹͳΔ

Slide 22

Slide 22 text

22 Androidͱಉ͡Α͏ʹςʔϚ͍ͬͯ͡ΈΔ͔

Slide 23

Slide 23 text

23 class MyApp extends StatelessWidget { // This widget is the root of your application. @override Widget build(BuildContext context) { return MaterialApp( title: '& COFFEE', theme: ThemeData( primarySwatch: Colors.blue, canvasColor: Colors.transparent ) ThemeDataͷcanvasColorʹಁ໌৭Λࢦఆ͓ͯ͘͠

Slide 24

Slide 24 text

24

Slide 25

Slide 25 text

25 showGeneralDialog( context: context, barrierColor: Colors.black12.withOpacity(0.6), // background color barrierDismissible: false, // should dialog be dismissed when tapped outside barrierLabel: "Dialog", // label for barrier transitionDuration: Duration(milliseconds: 400), pageBuilder: (_, __, ___) { return Scaffold( backgroundColor: Colors.black12.withOpacity(0.6), body: SizedBox.expand( දࣔWidgetͷഎܠ৭Λม͑Δ͚ͩͰΑ͔ͬͨ

Slide 26

Slide 26 text

26 ΋ͬͱ͍͍ํ๏͋ΔΑʂͱ͔ؒҧͬͯΔΑʂͱ͔͋Ε͹ ࠙਌ձͰڭ͍͚͑ͨͩΔͱ޾͍Ͱ͢

Slide 27

Slide 27 text

27 ͓ΘΓ