Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
2
22_23-J 21
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
22_23-J 21
22_23-J 21
Commits
76787b8c
Commit
76787b8c
authored
May 09, 2023
by
Kaushan H.K.R
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
themes setup
parent
d6627cfe
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
97 additions
and
0 deletions
+97
-0
FrontEnd/lib/theme/theme_constant.dart
FrontEnd/lib/theme/theme_constant.dart
+86
-0
FrontEnd/lib/theme/theme_manager.dart
FrontEnd/lib/theme/theme_manager.dart
+11
-0
No files found.
FrontEnd/lib/theme/theme_constant.dart
0 → 100644
View file @
76787b8c
import
'package:flutter/material.dart'
;
import
'package:google_fonts/google_fonts.dart'
;
const
Color
primaryColor
=
Colors
.
green
;
ThemeData
lightTheme
=
ThemeData
(
textTheme:
GoogleFonts
.
latoTextTheme
(),
brightness:
Brightness
.
light
,
primaryTextTheme:
const
TextTheme
(),
colorScheme:
const
ColorScheme
.
light
(
primary:
primaryColor
,
),
appBarTheme:
const
AppBarTheme
(
backgroundColor:
primaryColor
,
elevation:
0
,
iconTheme:
IconThemeData
(
color:
Colors
.
white
,
),
titleTextStyle:
TextStyle
(
color:
Colors
.
white
,
fontWeight:
FontWeight
.
bold
,
fontSize:
20
,
),
),
drawerTheme:
const
DrawerThemeData
(
elevation:
0
,
backgroundColor:
Colors
.
white
,
endShape:
RoundedRectangleBorder
(
borderRadius:
BorderRadius
.
only
(
topLeft:
Radius
.
circular
(
20
),
bottomRight:
Radius
.
circular
(
20
),
),
),
),
floatingActionButtonTheme:
const
FloatingActionButtonThemeData
(
backgroundColor:
primaryColor
,
foregroundColor:
Colors
.
white
,
),
primaryColor:
primaryColor
,
bottomNavigationBarTheme:
const
BottomNavigationBarThemeData
(
backgroundColor:
Colors
.
white
,
selectedItemColor:
primaryColor
,
unselectedItemColor:
Colors
.
black
,
selectedIconTheme:
IconThemeData
(
color:
primaryColor
,
),
unselectedIconTheme:
IconThemeData
(
color:
Colors
.
black
,
),
selectedLabelStyle:
TextStyle
(
fontWeight:
FontWeight
.
w600
,
),
unselectedLabelStyle:
TextStyle
(
fontWeight:
FontWeight
.
w600
,
),
),
elevatedButtonTheme:
ElevatedButtonThemeData
(
style:
ElevatedButton
.
styleFrom
(
padding:
const
EdgeInsets
.
fromLTRB
(
30
,
15
,
30
,
15
),
textStyle:
const
TextStyle
(
fontSize:
20
,
fontWeight:
FontWeight
.
bold
,
),
backgroundColor:
primaryColor
,
shape:
const
RoundedRectangleBorder
(
borderRadius:
BorderRadius
.
only
(
topLeft:
Radius
.
circular
(
20
),
bottomRight:
Radius
.
circular
(
20
),
),
),
),
),
inputDecorationTheme:
InputDecorationTheme
(
border:
OutlineInputBorder
(
borderRadius:
BorderRadius
.
circular
(
10
),
),
focusColor:
primaryColor
,
focusedBorder:
OutlineInputBorder
(
borderRadius:
BorderRadius
.
circular
(
10
),
borderSide:
const
BorderSide
(
color:
primaryColor
),
),
),
);
ThemeData
darkTheme
=
ThemeData
(
brightness:
Brightness
.
dark
,
);
FrontEnd/lib/theme/theme_manager.dart
0 → 100644
View file @
76787b8c
import
'package:flutter/material.dart'
;
class
ThemeManager
with
ChangeNotifier
{
ThemeMode
_themeMode
=
ThemeMode
.
light
;
get
themeMode
=>
_themeMode
;
toggleTheme
(
bool
isDark
)
{
_themeMode
=
isDark
?
ThemeMode
.
dark
:
ThemeMode
.
light
;
notifyListeners
();
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment