Skip to content

Commit

Permalink
chore(photobooth): upgrade dependencies (flutter#645)
Browse files Browse the repository at this point in the history
  • Loading branch information
felangel authored Jun 3, 2021
1 parent 3749d01 commit cdc4242
Show file tree
Hide file tree
Showing 47 changed files with 228 additions and 193 deletions.
2 changes: 1 addition & 1 deletion lib/app/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class _App extends StatelessWidget {
return MaterialApp(
title: 'I/O Photo Booth',
theme: theme,
localizationsDelegates: [
localizationsDelegates: const [
AppLocalizations.delegate,
GlobalMaterialLocalizations.delegate,
],
Expand Down
44 changes: 22 additions & 22 deletions lib/footer/widgets/footer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,16 @@ class Footer extends StatelessWidget {
child: Padding(
padding: const EdgeInsets.fromLTRB(50, 0, 50, 32),
child: ResponsiveLayoutBuilder(
small: (_, __) => _ColumnFooter(key: const Key('footer_column')),
large: (_, __) => _RowFooter(key: const Key('footer_row')),
small: (_, __) => const _ColumnFooter(key: Key('footer_column')),
large: (_, __) => const _RowFooter(key: Key('footer_row')),
),
),
);
}
}

class _ColumnFooter extends StatelessWidget {
_ColumnFooter({Key? key}) : super(key: key);
const _ColumnFooter({Key? key}) : super(key: key);

@override
Widget build(BuildContext context) {
Expand All @@ -55,22 +55,22 @@ class _ColumnFooter extends StatelessWidget {
Wrap(
alignment: WrapAlignment.center,
runSpacing: 16,
children: [
const FooterGoogleIOLink(),
const SizedBox(width: 30),
const FooterCodelabLink(),
const SizedBox(width: 30),
const FooterHowItsMadeLink(),
children: const [
FooterGoogleIOLink(),
SizedBox(width: 30),
FooterCodelabLink(),
SizedBox(width: 30),
FooterHowItsMadeLink(),
],
),
gap,
Wrap(
alignment: WrapAlignment.center,
runSpacing: 16,
children: [
const FooterTermsOfServiceLink(),
const SizedBox(width: 30),
const FooterPrivacyPolicyLink(),
children: const [
FooterTermsOfServiceLink(),
SizedBox(width: 30),
FooterPrivacyPolicyLink(),
],
),
],
Expand All @@ -79,24 +79,24 @@ class _ColumnFooter extends StatelessWidget {
}

class _RowFooter extends StatelessWidget {
_RowFooter({Key? key}) : super(key: key);
const _RowFooter({Key? key}) : super(key: key);

@override
Widget build(BuildContext context) {
const gap = SizedBox(width: 32);
return Row(
children: [
const FooterMadeWithLink(),
const Spacer(),
const FooterGoogleIOLink(),
children: const [
FooterMadeWithLink(),
Spacer(),
FooterGoogleIOLink(),
gap,
const FooterCodelabLink(),
FooterCodelabLink(),
gap,
const FooterHowItsMadeLink(),
FooterHowItsMadeLink(),
gap,
const FooterTermsOfServiceLink(),
FooterTermsOfServiceLink(),
gap,
const FooterPrivacyPolicyLink(),
FooterPrivacyPolicyLink(),
],
);
}
Expand Down
8 changes: 4 additions & 4 deletions lib/footer/widgets/icon_link.dart
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ class MadeWithIconLinks extends StatelessWidget {
Widget build(BuildContext context) {
return Row(
mainAxisSize: MainAxisSize.min,
children: [
const FlutterIconLink(),
const SizedBox(width: 8),
const FirebaseIconLink(),
children: const [
FlutterIconLink(),
SizedBox(width: 8),
FirebaseIconLink(),
],
);
}
Expand Down
1 change: 1 addition & 0 deletions lib/landing/loading_indicator_web.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// ignore: avoid_web_libraries_in_flutter
import 'dart:html' as html;

/// Removes the handed-coded piece of HTML used as the app loading
Expand Down
1 change: 1 addition & 0 deletions lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// ignore_for_file: avoid_print
import 'dart:async';

import 'package:authentication_repository/authentication_repository.dart';
Expand Down
8 changes: 4 additions & 4 deletions lib/share/view/share_bottom_sheet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ class ShareBottomSheet extends StatelessWidget {
),
const SizedBox(height: 42),
Column(
children: [
const TwitterButton(),
const SizedBox(height: 18),
const FacebookButton(),
children: const [
TwitterButton(),
SizedBox(height: 18),
FacebookButton(),
],
),
const SizedBox(height: 42),
Expand Down
10 changes: 5 additions & 5 deletions lib/share/view/share_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class ShareDialog extends StatelessWidget {
child: Stack(
children: [
SingleChildScrollView(
child: Container(
child: SizedBox(
width: 900,
child: Padding(
padding: const EdgeInsets.symmetric(
Expand Down Expand Up @@ -57,10 +57,10 @@ class ShareDialog extends StatelessWidget {
const SizedBox(height: 30),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
const TwitterButton(),
const SizedBox(width: 36),
const FacebookButton(),
children: const [
TwitterButton(),
SizedBox(width: 36),
FacebookButton(),
],
),
const SizedBox(height: 30),
Expand Down
4 changes: 2 additions & 2 deletions lib/share/view/share_error_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class ShareErrorDialog extends StatelessWidget {
child: Stack(
children: [
SingleChildScrollView(
child: Container(
child: SizedBox(
width: 900,
child: Padding(
padding: const EdgeInsets.symmetric(
Expand All @@ -35,7 +35,7 @@ class ShareErrorDialog extends StatelessWidget {
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
SizedBox(
height: 300,
child: Image.asset(
'assets/images/error_photo_desktop.png',
Expand Down
2 changes: 1 addition & 1 deletion lib/share/widgets/animated_photobooth_photo.dart
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ class _AnimatedPhotoboothPhoto extends StatelessWidget {
@override
Widget build(BuildContext context) {
final _image = image;
return Container(
return SizedBox(
height: sprite.sprites.size.height * scale,
width: sprite.sprites.size.width * scale,
child: Stack(
Expand Down
2 changes: 1 addition & 1 deletion lib/share/widgets/share_background.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class ShareBackground extends StatelessWidget {
Widget build(BuildContext context) {
return Stack(
children: [
Container(
SizedBox(
width: double.infinity,
height: double.infinity,
child: Image.asset(
Expand Down
12 changes: 6 additions & 6 deletions lib/share/widgets/share_body.dart
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,12 @@ class ShareBody extends StatelessWidget {
AnimatedFadeIn(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
const SizedBox(height: 20),
const ShareErrorHeading(),
const SizedBox(height: 20),
const ShareErrorSubheading(),
const SizedBox(height: 30),
children: const [
SizedBox(height: 20),
ShareErrorHeading(),
SizedBox(height: 20),
ShareErrorSubheading(),
SizedBox(height: 30),
],
),
)
Expand Down
24 changes: 9 additions & 15 deletions lib/share/widgets/share_progress_overlay.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,16 @@ class ShareProgressOverlay extends StatelessWidget {
return BlocBuilder<ShareBloc, ShareState>(
builder: (context, state) => state.uploadStatus.isLoading ||
(state.compositeStatus.isLoading && state.isUploadRequested)
? _ShareProgressOverlay(
key: const Key('shareProgressOverlay_loading'),
? const _ShareProgressOverlay(
key: Key('shareProgressOverlay_loading'),
)
: const SizedBox(key: Key('shareProgressOverlay_nothing')),
);
}
}

class _ShareProgressOverlay extends StatelessWidget {
_ShareProgressOverlay({
Key? key,
}) : super(key: key);
const _ShareProgressOverlay({Key? key}) : super(key: key);

@override
Widget build(BuildContext context) {
Expand All @@ -39,11 +37,11 @@ class _ShareProgressOverlay extends StatelessWidget {
filter: ImageFilter.blur(sigmaX: 6, sigmaY: 6),
child: Center(
child: ResponsiveLayoutBuilder(
small: (_, __) => _MobileShareProgressOverlay(
key: const Key('shareProgressOverlay_mobile'),
small: (_, __) => const _MobileShareProgressOverlay(
key: Key('shareProgressOverlay_mobile'),
),
large: (_, __) => _DesktopShareProgressOverlay(
key: const Key('shareProgressOverlay_desktop'),
large: (_, __) => const _DesktopShareProgressOverlay(
key: Key('shareProgressOverlay_desktop'),
),
),
),
Expand All @@ -53,9 +51,7 @@ class _ShareProgressOverlay extends StatelessWidget {
}

class _DesktopShareProgressOverlay extends StatelessWidget {
_DesktopShareProgressOverlay({
Key? key,
}) : super(key: key);
const _DesktopShareProgressOverlay({Key? key}) : super(key: key);

@override
Widget build(BuildContext context) {
Expand Down Expand Up @@ -92,9 +88,7 @@ class _DesktopShareProgressOverlay extends StatelessWidget {
}

class _MobileShareProgressOverlay extends StatelessWidget {
_MobileShareProgressOverlay({
Key? key,
}) : super(key: key);
const _MobileShareProgressOverlay({Key? key}) : super(key: key);

@override
Widget build(BuildContext context) {
Expand Down
8 changes: 4 additions & 4 deletions lib/stickers/view/stickers_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ class StickersView extends StatelessWidget {
left: 15,
top: 15,
child: Row(
children: [
const _RetakeButton(),
const ClearStickersButtonLayer(),
children: const [
_RetakeButton(),
ClearStickersButtonLayer(),
],
),
),
Expand Down Expand Up @@ -154,7 +154,7 @@ class _DraggableStickers extends StatelessWidget {
.add(const PhotoDeleteSelectedStickerTapped()),
size: sticker.asset.size * _initialStickerScale,
constraints: sticker.getImageConstraints(),
child: Container(
child: SizedBox(
width: double.infinity,
height: double.infinity,
child: Image.asset(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ class ClearStickersButtonLayer extends StatelessWidget {
context: context,
child: const ClearStickersDialog(),
);
if (confirmed)
if (confirmed) {
context.read<PhotoboothBloc>().add(const PhotoClearStickersTapped());
}
},
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ class ClearStickersDialog extends StatelessWidget {
alignment: WrapAlignment.center,
spacing: 30,
runSpacing: 15,
children: [
const ClearStickersCancelButton(),
const ClearStickersConfirmButton(),
children: const [
ClearStickersCancelButton(),
ClearStickersConfirmButton(),
],
),
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class _StickersDrawerLayerState extends State<StickersDrawerLayer> {
buildWhen: (previous, current) => current != previous,
builder: (context, state) {
if (state.isDrawerActive &&
MediaQuery.of(context).size.width >= PhotoboothBreakpoints.small)
MediaQuery.of(context).size.width >= PhotoboothBreakpoints.small) {
return Positioned(
right: 0,
top: 0,
Expand All @@ -68,6 +68,7 @@ class _StickersDrawerLayerState extends State<StickersDrawerLayer> {
.add(const StickersDrawerToggled()),
),
);
}
return const SizedBox();
},
);
Expand Down
12 changes: 6 additions & 6 deletions lib/stickers/widgets/stickers_tabs.dart
Original file line number Diff line number Diff line change
Expand Up @@ -51,24 +51,24 @@ class _StickersTabsState extends State<StickersTabs>
TabBar(
onTap: widget.onTabChanged,
controller: _tabController,
tabs: [
const StickersTab(
tabs: const [
StickersTab(
key: Key('stickersTabs_googleTab'),
assetPath: 'assets/icons/google_icon.png',
),
const StickersTab(
StickersTab(
key: Key('stickersTabs_hatsTab'),
assetPath: 'assets/icons/hats_icon.png',
),
const StickersTab(
StickersTab(
key: Key('stickersTabs_eyewearTab'),
assetPath: 'assets/icons/eyewear_icon.png',
),
const StickersTab(
StickersTab(
key: Key('stickersTabs_foodTab'),
assetPath: 'assets/icons/food_icon.png',
),
const StickersTab(
StickersTab(
key: Key('stickersTabs_shapesTab'),
assetPath: 'assets/icons/shapes_icon.png',
),
Expand Down
3 changes: 3 additions & 0 deletions packages/analytics/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
include: package:very_good_analysis/analysis_options.yaml
linter:
rules:
avoid_web_libraries_in_flutter: false
2 changes: 1 addition & 1 deletion packages/analytics/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ dev_dependencies:
flutter_test:
sdk: flutter
mocktail: ^0.1.1
very_good_analysis: ^2.0.3
very_good_analysis: ^2.0.4
2 changes: 1 addition & 1 deletion packages/authentication_repository/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: Repository which manages user authentication using Firebase Authent
version: 1.0.0+1

environment:
sdk: ">=2.12.0-0 <3.0.0"
sdk: ">=2.12.0 <3.0.0"

dependencies:
flutter:
Expand Down
Loading

0 comments on commit cdc4242

Please sign in to comment.