Skip to content

Commit

Permalink
Migrating to Flutter >2 and Dart >=2.12.0 - Null Safety and others mi…
Browse files Browse the repository at this point in the history
…grations

Merge pull request #16 from felipecastrosales/dev
  • Loading branch information
felipecastrosales authored Aug 30, 2021
2 parents f2b5f27 + 86a2e2d commit daa344f
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 77 deletions.
24 changes: 17 additions & 7 deletions lib/pages/home/widgets/appbar/web_app_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,33 @@ class WebAppBar extends StatelessWidget {
const SizedBox(width: 16),
SizedBox(
height: 38,
child: OutlineButton(
child: OutlinedButton(
onPressed: () {},
textColor: Colors.white,
borderSide: BorderSide(color: Colors.white, width: 1.5),
style: ButtonStyle(
side: MaterialStateProperty.resolveWith<BorderSide>(
(states) {
return BorderSide(color: Colors.white, width: 1.5);
},
),
),
child: Text(
' Log in ',
style: TextStyle(fontWeight: FontWeight.w600),
style: TextStyle(
fontWeight: FontWeight.w600,
color: Colors.white,
),
),
),
),
const SizedBox(width: 16),
SizedBox(
height: 40,
child: RaisedButton(
child: ElevatedButton(
onPressed: () {},
color: Colors.white,
textColor: Colors.black,
style: ElevatedButton.styleFrom(
primary: Colors.white,
onPrimary: Colors.black,
),
child: Text(
' Sign up ',
style: TextStyle(fontWeight: FontWeight.w800),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class WebAppBarResponsiveContent extends StatelessWidget {
height: 45,
decoration: BoxDecoration(
color: Colors.grey[100],
border: Border.all(color: Colors.grey[600]),
border: Border.all(color: Colors.grey[600]!),
),
child: Row(
children: [
Expand All @@ -37,7 +37,7 @@ class WebAppBarResponsiveContent extends StatelessWidget {
),
if (constraints.maxWidth >= 320) ...[
const SizedBox(width: 24),
FlatButton(
TextButton(
onPressed: () {},
child: Text(
'Learn',
Expand All @@ -51,7 +51,7 @@ class WebAppBarResponsiveContent extends StatelessWidget {
],
if (constraints.maxWidth >= 500) ...[
const SizedBox(width: 8),
FlatButton(
TextButton(
onPressed: () {},
child: Text(
'Flutter',
Expand Down
4 changes: 2 additions & 2 deletions lib/pages/home/widgets/sections/advantages_section.dart
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class AdvantagesSection extends StatelessWidget {
return Container(
padding: const EdgeInsets.symmetric(vertical: 20, horizontal: 16),
decoration: BoxDecoration(
border: Border(bottom: BorderSide(color: Colors.grey[700])),
border: Border(bottom: BorderSide(color: Colors.grey[700]!)),
),
child: Wrap(
alignment: WrapAlignment.spaceEvenly,
Expand Down Expand Up @@ -106,7 +106,7 @@ class AdvantagesSection extends StatelessWidget {
return Container(
padding: const EdgeInsets.symmetric(vertical: 20, horizontal: 16),
decoration: BoxDecoration(
border: Border(bottom: BorderSide(color: Colors.grey[700])),
border: Border(bottom: BorderSide(color: Colors.grey[700]!)),
),
child: Wrap(
alignment: WrapAlignment.spaceEvenly,
Expand Down
4 changes: 2 additions & 2 deletions lib/pages/home/widgets/sections/custom_search_field.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ class CustomSearchField extends StatelessWidget {
decoration: InputDecoration(
isDense: true,
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(color: Colors.grey[50]),
borderSide: BorderSide(color: Colors.grey[50]!),
),
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(color: Colors.grey[50]),
borderSide: BorderSide(color: Colors.grey[50]!),
),
hintStyle: TextStyle(color: Colors.grey[50]),
hintText: 'Type some search here',
Expand Down
70 changes: 7 additions & 63 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,85 +1,29 @@
name: FLUDdemy
description: FLUdemy.

# The following line prevents the package from being accidentally published to
# pub.dev using `pub publish`. This is preferred for private packages.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev

# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# In Android, build-name is used as versionName while build-number used as versionCode.
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
publish_to: 'none'
version: 1.0.0+1

environment:
sdk: ">=2.7.0 <3.0.0"
sdk: ">=2.12.0 <3.0.0"

dependencies:
auto_size_text: ^3.0.0-nullsafety.0
cupertino_icons: ^1.0.3
device_preview: ^0.7.4
effective_dart: ^1.3.2
flutter:
sdk: flutter


# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.1
auto_size_text: ^2.1.0
device_preview: ^0.6.2-beta
flutter_svg: ^0.22.0

dev_dependencies:
effective_dart: ^1.3.0
flutter_test:
sdk: flutter
integration_test:
sdk: flutter

# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec

# The following section is specific to Flutter.
flutter:

# The following line ensures that the Material Icons font is
# included with your application, so that you can use the icons in
# the material Icons class.
uses-material-design: true

# To add assets to your application, add an assets section, like this:
# assets:
# - images/a_dot_burr.jpeg
# - images/a_dot_ham.jpeg
assets:
- assets/app.jpg
- assets/course.jpg
- assets/fu.png

# An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.dev/assets-and-images/#resolution-aware.

# For details regarding adding assets from package dependencies, see
# https://flutter.dev/assets-and-images/#from-packages

# To add custom fonts to your application, add a fonts section here,
# in this "flutter" section. Each entry in this list should have a
# "family" key with the font family name, and a "fonts" key with a
# list giving the asset and other descriptors for the font. For
# example:
# fonts:
# - family: Schyler
# fonts:
# - asset: fonts/Schyler-Regular.ttf
# - asset: fonts/Schyler-Italic.ttf
# style: italic
# - family: Trajan Pro
# fonts:
# - asset: fonts/TrajanPro.ttf
# - asset: fonts/TrajanPro_Bold.ttf
# weight: 700
#
# For details regarding fonts from package dependencies,
# see https://flutter.dev/custom-fonts/#from-packages

0 comments on commit daa344f

Please sign in to comment.