-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from lucas-goldner/fc-9-eventchannel-slides
Fc 9 eventchannel slides
- Loading branch information
Showing
13 changed files
with
413 additions
and
19 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
136 changes: 136 additions & 0 deletions
136
lib/pages/06_method_channels/view/method_channels_slide.dart
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,136 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:fluttercon_2023_presentation/generated/l10n.dart'; | ||
import 'package:fluttercon_2023_presentation/presentation/provider/presentation_controller_provider.dart'; | ||
import 'package:fluttercon_2023_presentation/slides/widgets/components/arrows/arrow.dart'; | ||
import 'package:fluttercon_2023_presentation/slides/widgets/layout/layout_body.dart'; | ||
import 'package:fluttercon_2023_presentation/slides/widgets/layout/layout_header.dart'; | ||
import 'package:fluttercon_2023_presentation/slides/widgets/text/regular_text.dart'; | ||
import 'package:fluttercon_2023_presentation/slides/widgets/text/title.dart'; | ||
import 'package:fluttercon_2023_presentation/styles/fc_gradients.dart'; | ||
import 'package:hooks_riverpod/hooks_riverpod.dart'; | ||
|
||
class MethodChannelsSlide extends HookConsumerWidget { | ||
const MethodChannelsSlide({super.key}); | ||
|
||
@override | ||
Widget build(BuildContext context, WidgetRef ref) { | ||
final index = ref.watch(presentationController).itemIndex; | ||
|
||
return DecoratedBox( | ||
decoration: const BoxDecoration( | ||
gradient: FCGradients.backgroundPrimary, | ||
), | ||
child: Column( | ||
children: [ | ||
LayoutHeader( | ||
Column( | ||
children: [ | ||
const SizedBox( | ||
height: 48, | ||
), | ||
TextTitle(S.of(context).TypicalWay), | ||
], | ||
), | ||
flexUnits: 2, | ||
), | ||
LayoutBody( | ||
Row( | ||
mainAxisAlignment: MainAxisAlignment.center, | ||
children: [ | ||
Column( | ||
children: [ | ||
const Spacer(), | ||
Visibility( | ||
visible: index >= 1, | ||
child: Padding( | ||
padding: const EdgeInsets.symmetric(horizontal: 16), | ||
child: Row( | ||
children: [ | ||
RegularText(S.of(context).flutter), | ||
const SizedBox( | ||
width: 60, | ||
), | ||
Arrow( | ||
S.of(context).invokeFunctions, | ||
height: 48, | ||
), | ||
const SizedBox( | ||
width: 72, | ||
), | ||
RegularText(S.of(context).methodChannel), | ||
const SizedBox( | ||
width: 60, | ||
), | ||
Arrow( | ||
S.of(context).receiveValue, | ||
height: 48, | ||
), | ||
const SizedBox( | ||
width: 120, | ||
), | ||
RegularText(S.of(context).flutter), | ||
], | ||
), | ||
), | ||
), | ||
const SizedBox( | ||
height: 80, | ||
), | ||
Visibility( | ||
visible: index >= 2, | ||
child: Padding( | ||
padding: const EdgeInsets.symmetric(horizontal: 16), | ||
child: Row( | ||
children: [ | ||
RegularText(S.of(context).flutter), | ||
const SizedBox( | ||
width: 60, | ||
), | ||
Arrow( | ||
S.of(context).startsListening, | ||
height: 48, | ||
), | ||
const SizedBox( | ||
width: 100, | ||
), | ||
RegularText(S.of(context).eventChannels), | ||
const SizedBox( | ||
width: 60, | ||
), | ||
Arrow( | ||
S.of(context).receivesEvents, | ||
height: 48, | ||
), | ||
const SizedBox( | ||
width: 20, | ||
), | ||
RegularText(S.of(context).flutter), | ||
], | ||
), | ||
), | ||
), | ||
const SizedBox( | ||
height: 20, | ||
), | ||
Visibility( | ||
visible: index >= 2, | ||
child: RegularText( | ||
S.of(context).implementsFlutterStreamHandler, | ||
fontSize: 32, | ||
), | ||
), | ||
const SizedBox( | ||
height: 92, | ||
), | ||
const Spacer(), | ||
], | ||
), | ||
], | ||
), | ||
flexUnits: 8, | ||
), | ||
], | ||
), | ||
); | ||
} | ||
} |
Oops, something went wrong.