Skip to content

Commit

Permalink
Merge branch 'release/2.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
felipecastrosales committed Jan 19, 2023
2 parents daa344f + b1c4ae3 commit c97c803
Show file tree
Hide file tree
Showing 80 changed files with 3,319 additions and 325 deletions.
3 changes: 1 addition & 2 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
include: package:effective_dart/analysis_options.yaml
include: package:flutter_lints/flutter.yaml

linter:
rules:
public_member_api_docs: false
1 change: 1 addition & 0 deletions ios/Flutter/Debug.xcconfig
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
#include "Generated.xcconfig"
1 change: 1 addition & 0 deletions ios/Flutter/Release.xcconfig
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
#include "Generated.xcconfig"
41 changes: 41 additions & 0 deletions ios/Podfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Uncomment this line to define a global platform for your project
# platform :ios, '11.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

project 'Runner', {
'Debug' => :debug,
'Profile' => :release,
'Release' => :release,
}

def flutter_root
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
unless File.exist?(generated_xcode_build_settings_path)
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
end

File.foreach(generated_xcode_build_settings_path) do |line|
matches = line.match(/FLUTTER_ROOT\=(.*)/)
return matches[1].strip if matches
end
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end

require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)

flutter_ios_podfile_setup

target 'Runner' do
use_frameworks!
use_modular_headers!

flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end

post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
end
end
6 changes: 6 additions & 0 deletions lib/app/core/responsive/breakpoints.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
class Breakpoints {
static const mobileBreakpoint = 650;
static const tabletMedium = 1000;
static const showOnlyLearn = 320;
static const showFlutterButton = 500;
}
10 changes: 10 additions & 0 deletions lib/app/core/theme/app_themes.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import 'package:flutter/material.dart';

import 'tokens/app_colors.dart';

class AppThemes {
static final primary = ThemeData(
primarySwatch: AppColors.blue,
scaffoldBackgroundColor: AppColors.vampireBlack,
);
}
32 changes: 32 additions & 0 deletions lib/app/core/theme/tokens/app_colors.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import 'package:flutter/material.dart';

// Get color name from: https://www.color-name.com/hex/
class AppColors {
static const lotion = Color(0XFFFAFAFA);
static const cultured = Color(0XFFF5F5F5);
static const grayX11 = Color(0XFFBDBDBD);
static const graniteGray = Color(0XFF616161);
static const buttonBlue = Color(0xFF2196F3);
static const vampireBlack = Color(0XFF0A0A0A);
static const black87 = Color(0XDD000000);
static const sonicSilver = Color(0XFF757575);
static const white = Color(0XFFFFFFFF);

// Flutter Config for `Colors.blue` and use `AppColors.blue`
static const int _bluePrimaryValue = 0xFF2196F3;
static const MaterialColor blue = MaterialColor(
_bluePrimaryValue,
<int, Color>{
50: Color(0xFFE3F2FD),
100: Color(0xFFBBDEFB),
200: Color(0xFF90CAF9),
300: Color(0xFF64B5F6),
400: Color(0xFF42A5F5),
500: Color(_bluePrimaryValue),
600: Color(0xFF1E88E5),
700: Color(0xFF1976D2),
800: Color(0xFF1565C0),
900: Color(0xFF0D47A1),
},
);
}
5 changes: 5 additions & 0 deletions lib/app/core/values/app_assets.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class AppAssets {
static const logo = 'assets/fu.png';
static const course = 'assets/app.jpg';
static const app = 'assets/app.jpg';
}
26 changes: 26 additions & 0 deletions lib/app/core/values/app_texts.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
class AppTexts {
static const app = 'FLUdemy | Courses';
static const fludemy = 'FLUdemy';
static const learn = 'Learn';
static const flutter = 'Flutter';
static const loginSpaced = ' Log in ';
static const signUpSpaced = ' Sign up ';
static const responsivenessInTheFlutterPlatforms =
'Responsiveness in the Flutter | '
'Mobile, Tablet, Web and Desktop';
static const responsiveness = 'Responsiveness';
static const danielCiolfiAndFelipeSales = 'Daniel Ciolfi and Felipe Sales';
static const price22dot90 = 'R\$22,90';
static const letsLearnFlutterWithTheseCourses =
'Let\'s learn Flutter with these courses';
static const theFlutterIsAmazing = 'The Flutter is amazing! '
'Create amazing things with the Flutter Framework.';
static const typeSomeSearchHere = 'Type some search here';
static const searchForAnythingSpaced = ' Search for anything... ';
static const moreThan100kDevelopers = '+100.000 developers';
static const awesomeExclamation = 'Awesome!';
static const certificateOfComplete = 'Certificate of Complete';
static const sensationalExclamation = 'Sensational!';
static const fullAccess = 'Full Access';
static const anywhereExclamation = 'Anywhere!';
}
23 changes: 23 additions & 0 deletions lib/app/fludemy_app.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import 'package:flutter/material.dart';

import 'package:device_preview/device_preview.dart';

import 'package:fludemy/app/core/theme/app_themes.dart';
import 'package:fludemy/app/core/values/app_texts.dart';
import 'package:fludemy/app/pages/home/home_page.dart';

class FludemyApp extends StatelessWidget {
const FludemyApp({super.key});

@override
Widget build(BuildContext context) {
return MaterialApp(
title: AppTexts.app,
debugShowCheckedModeBanner: false,
theme: AppThemes.primary,
builder: DevicePreview.appBuilder,
locale: DevicePreview.locale(context),
home: const HomePage(),
);
}
}
31 changes: 19 additions & 12 deletions lib/pages/home/home_page.dart → lib/app/pages/home/home_page.dart
Original file line number Diff line number Diff line change
@@ -1,34 +1,41 @@
import 'package:flutter/material.dart';

import '../../breakpoints.dart';
import 'package:fludemy/app/core/responsive/breakpoints.dart';

import 'widgets/appbar/mobile_app_bar.dart';
import 'widgets/appbar/web_app_bar.dart';
import 'widgets/sections/advantages_section.dart';
import 'widgets/sections/advantages_section/advantages_section.dart';
import 'widgets/sections/course_section.dart';
import 'widgets/sections/top_section.dart';

class HomePage extends StatelessWidget {
const HomePage({super.key});

@override
Widget build(BuildContext context) {
return LayoutBuilder(
builder: (context, constraints) {
return Scaffold(
appBar: constraints.maxWidth < mobileBreakpoint
? PreferredSize(
child: MobileAppBar(),
preferredSize: Size(double.infinity, 56))
: PreferredSize(
child: WebAppBar(),
preferredSize: Size(double.infinity, 80)),
drawer: constraints.maxWidth < mobileBreakpoint ? Drawer() : null,
appBar: constraints.maxWidth < Breakpoints.mobileBreakpoint
? const PreferredSize(
preferredSize: Size(double.infinity, 56),
child: MobileAppBar(),
)
: const PreferredSize(
preferredSize: Size(double.infinity, 80),
child: WebAppBar(),
),
drawer: constraints.maxWidth < Breakpoints.mobileBreakpoint
? const Drawer()
: null,
body: Align(
alignment: Alignment.topCenter,
child: ConstrainedBox(
constraints: BoxConstraints(
constraints: const BoxConstraints(
maxWidth: 1200,
),
child: ListView(
children: [
children: const [
TopSection(),
AdvantagesSection(),
CourseSection(),
Expand Down
31 changes: 31 additions & 0 deletions lib/app/pages/home/widgets/appbar/mobile_app_bar.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import 'package:flutter/material.dart';

import 'package:fludemy/app/core/theme/tokens/app_colors.dart';
import 'package:fludemy/app/core/values/app_assets.dart';

class MobileAppBar extends StatelessWidget {
const MobileAppBar({super.key});

@override
Widget build(BuildContext context) {
return AppBar(
title: Image.asset(
AppAssets.logo,
height: 50,
width: 50,
),
centerTitle: true,
backgroundColor: AppColors.black87,
actions: [
IconButton(
icon: const Icon(Icons.search),
onPressed: () {},
),
IconButton(
icon: const Icon(Icons.shopping_cart_rounded),
onPressed: () {},
),
],
);
}
}
Original file line number Diff line number Diff line change
@@ -1,25 +1,35 @@
import 'package:flutter/material.dart';

import 'package:fludemy/app/core/theme/tokens/app_colors.dart';
import 'package:fludemy/app/core/values/app_assets.dart';
import 'package:fludemy/app/core/values/app_texts.dart';

import 'web_app_bar_responsive_content.dart';

class WebAppBar extends StatelessWidget {
const WebAppBar({super.key});

@override
Widget build(BuildContext context) {
return AppBar(
backgroundColor: Colors.black,
backgroundColor: AppColors.black87,
toolbarHeight: 80,
title: Row(
children: [
Image.asset('assets/fu.png', height: 40, width: 40),
Text(
'FLUdemy',
style: TextStyle(fontWeight: FontWeight.w800),
Image.asset(
AppAssets.logo,
height: 40,
width: 40,
),
const Text(
AppTexts.fludemy,
style: TextStyle(fontWeight: FontWeight.w800),
),
const SizedBox(width: 24),
WebAppBarResponsiveContent(),
const WebAppBarResponsiveContent(),
const SizedBox(width: 24),
IconButton(
icon: Icon(Icons.shopping_cart_rounded),
icon: const Icon(Icons.shopping_cart_rounded),
onPressed: () {},
),
const SizedBox(width: 16),
Expand All @@ -30,15 +40,18 @@ class WebAppBar extends StatelessWidget {
style: ButtonStyle(
side: MaterialStateProperty.resolveWith<BorderSide>(
(states) {
return BorderSide(color: Colors.white, width: 1.5);
return const BorderSide(
color: AppColors.white,
width: 1.5,
);
},
),
),
child: Text(
' Log in ',
child: const Text(
AppTexts.loginSpaced,
style: TextStyle(
fontWeight: FontWeight.w600,
color: Colors.white,
fontWeight: FontWeight.w600,
color: AppColors.white,
),
),
),
Expand All @@ -49,11 +62,11 @@ class WebAppBar extends StatelessWidget {
child: ElevatedButton(
onPressed: () {},
style: ElevatedButton.styleFrom(
primary: Colors.white,
onPrimary: Colors.black,
foregroundColor: AppColors.black87,
backgroundColor: AppColors.white,
),
child: Text(
' Sign up ',
child: const Text(
AppTexts.signUpSpaced,
style: TextStyle(fontWeight: FontWeight.w800),
),
),
Expand Down
Loading

0 comments on commit c97c803

Please sign in to comment.