-
Notifications
You must be signed in to change notification settings - Fork 43
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 #31 from mustafauys/master
Updated with minor changes.
- Loading branch information
Showing
27 changed files
with
396 additions
and
117 deletions.
There are no files selected for viewing
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
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
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
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
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
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
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,15 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
// Çalışma Mantığı | ||
// Kullanacağımız renk kodunu ismiyle birlikte buraya ekliyoruz. | ||
// Daha sonra buradaki rengi kullanacağımız widget içine önce bu file import ediyoruz. | ||
// Import ettikten sonra rengi kullanacağımız satıra gelip 'ColorConstants.white' örneği gibi istediğimiz rengi ekliyoruz. Detaylar Readme.md | ||
class ColorConstants { | ||
static const Color black = Color(0xFF000000); | ||
static const Color white = Color(0xFFffffff); | ||
static const Color white70 = Color(0xB3FFFFFF); | ||
static const Color amaranth = Color(0xFFE91E63); | ||
static const Color pomegranate = Color(0xFFE91E63); | ||
static const Color dodgerBlue = Color(0xFF2196F3); | ||
static const Color fruitSalad = Color(0xFF4CAF50); | ||
} |
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,7 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
abstract class BaseTheme { | ||
ThemeData get themeData; | ||
|
||
TextStyle get customSnackBar; | ||
} |
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,20 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:ready_to_use_widgets/core/init/theme/base/base_theme.dart'; | ||
|
||
class DarkTheme extends BaseTheme { | ||
static DarkTheme? _instance; | ||
|
||
static DarkTheme? get instance { | ||
if (_instance != null) return _instance; | ||
_instance = DarkTheme._init(); | ||
return _instance; | ||
} | ||
|
||
DarkTheme._init(); | ||
|
||
@override | ||
ThemeData get themeData => throw UnimplementedError(); | ||
|
||
@override | ||
TextStyle get customSnackBar => throw UnimplementedError(); | ||
} |
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,31 @@ | ||
enum AppTheme { dark, light } | ||
|
||
extension AppThemeExtension on AppTheme { | ||
String get appThemeToString { | ||
switch (this) { | ||
case AppTheme.dark: | ||
return 'AppTheme.DARK'; | ||
case AppTheme.light: | ||
return 'AppTheme.LIGHT'; | ||
default: | ||
{ | ||
return 'AppTheme.LIGHT'; | ||
} | ||
} | ||
} | ||
} | ||
|
||
extension AppThemeStringExtension on String { | ||
AppTheme get stringToAppTheme { | ||
switch (this) { | ||
case 'AppTheme.DARK': | ||
return AppTheme.dark; | ||
case 'AppTheme.LIGHT': | ||
return AppTheme.light; | ||
default: | ||
{ | ||
return AppTheme.light; | ||
} | ||
} | ||
} | ||
} |
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,31 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:google_fonts/google_fonts.dart'; | ||
import 'package:ready_to_use_widgets/atomic/beauty_textfield/beauty_textfield.dart'; | ||
import 'package:ready_to_use_widgets/core/init/constants/color_constant.dart'; | ||
import 'package:ready_to_use_widgets/core/init/theme/base/base_theme.dart'; | ||
|
||
class LightTheme extends BaseTheme { | ||
static LightTheme? _instance; | ||
|
||
static LightTheme? get instance { | ||
if (_instance != null) return _instance; | ||
_instance = LightTheme._init(); | ||
return _instance; | ||
} | ||
|
||
LightTheme._init(); | ||
|
||
@override | ||
ThemeData get themeData => throw UnimplementedError(); | ||
|
||
// Örnek olarak yapılmıştır. | ||
|
||
@override | ||
TextStyle get customSnackBar => GoogleFonts.ubuntu( | ||
textStyle: const TextStyle( | ||
fontSize: 16, | ||
fontWeight: FontWeight.bold, | ||
color: ColorConstants.dodgerBlue, | ||
), | ||
); | ||
} |
Oops, something went wrong.