Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
org.benoitharrault.hangman
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
android
org.benoitharrault.hangman
Merge requests
!46
Resolve "Use ApplicationSettings widgets from flutter_custom_toolbox"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Expand sidebar
Merged
Resolve "Use ApplicationSettings widgets from flutter_custom_toolbox"
49-use-applicationsettings-widgets-from-flutter_custom_toolbox
into
master
Overview
0
Commits
1
Pipelines
2
Changes
8
Merged
Resolve "Use ApplicationSettings widgets from flutter_custom_toolbox"
Benoît Harrault
requested to merge
49-use-applicationsettings-widgets-from-flutter_custom_toolbox
into
master
9 months ago
Overview
0
Commits
1
Pipelines
2
Changes
8
Closes
#49 (closed)
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
36bc6864
1 commit,
9 months ago
8 files
+
10
−
166
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
8
lib/cubit/theme_cubit.dart deleted
100644 → 0
+
0
−
30
View file @ 36b40403
import
'package:flutter/material.dart'
;
import
'package:flutter_custom_toolbox/flutter_toolbox.dart'
;
part
'theme_state.dart'
;
class
ThemeCubit
extends
HydratedCubit
<
ThemeModeState
>
{
ThemeCubit
()
:
super
(
const
ThemeModeState
());
void
getTheme
(
ThemeModeState
state
)
{
emit
(
state
);
}
@override
ThemeModeState
?
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
switch
(
json
[
'themeMode'
])
{
case
'ThemeMode.dark'
:
return
const
ThemeModeState
(
themeMode:
ThemeMode
.
dark
);
case
'ThemeMode.light'
:
return
const
ThemeModeState
(
themeMode:
ThemeMode
.
light
);
case
'ThemeMode.system'
:
default
:
return
const
ThemeModeState
(
themeMode:
ThemeMode
.
system
);
}
}
@override
Map
<
String
,
String
>
?
toJson
(
ThemeModeState
state
)
{
return
<
String
,
String
>{
'themeMode'
:
state
.
themeMode
.
toString
()};
}
}
Loading