Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions violet/lib/database/user/search.dart
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ class SearchLogDatabase {
datetime ??= DateTime.now();
final db = await CommonUserDatabase.getInstance();
final body = {
'SearchWhat': searchWhat,
'DateTime': datetime.toString(),
'SearchWhat': searchWhat as Object,
'DateTime': datetime.toString() as Object,
};
await db.insert('SearchLog', body);
if (Platform.isAndroid || Platform.isIOS) {
Expand Down
4 changes: 2 additions & 2 deletions violet/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ class MyApp extends StatelessWidget {
: SystemUiOverlayStyle.light),
useMaterial3: false,
brightness: brightness,
bottomSheetTheme:
BottomSheetThemeData(backgroundColor: Colors.black.withOpacity(0)),
bottomSheetTheme: BottomSheetThemeData(
backgroundColor: Colors.black.withValues(alpha: 0)),
scaffoldBackgroundColor:
Settings.themeBlack && Settings.themeWhat ? Colors.black : null,
dialogBackgroundColor: Settings.themeBlack && Settings.themeWhat
Expand Down
10 changes: 5 additions & 5 deletions violet/lib/pages/after_loading/afterloading_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ class AfterLoadingPageState extends State<AfterLoadingPage>
backgroundColor: Settings.themeWhat
? Settings.themeBlack
? const Color(0xFF060606)
: Colors.grey.shade900.withOpacity(0.90)
: Colors.grey.shade900.withValues(alpha: 0.90)
: Colors.grey.shade50,
icon: Icon(iconData),
label: translations.trans(key),
Expand Down Expand Up @@ -209,15 +209,15 @@ class AfterLoadingPageState extends State<AfterLoadingPage>
height: 54,
child: Container(
decoration: BoxDecoration(
color: page == _currentPage ? color.withOpacity(0.4) : null,
color: page == _currentPage ? color.withValues(alpha: 0.4) : null,
borderRadius: const BorderRadius.all(Radius.circular(10))),
child: InkWell(
customBorder: const RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(10))),
hoverColor: color,
highlightColor: color.withOpacity(0.2),
highlightColor: color.withValues(alpha: 0.2),
focusColor: color,
splashColor: color.withOpacity(0.3),
splashColor: color.withValues(alpha: 0.3),
child: Row(
children: [
const SizedBox(width: 12),
Expand Down Expand Up @@ -311,7 +311,7 @@ class AfterLoadingPageState extends State<AfterLoadingPage>

return PopScope(
canPop: false,
onPopInvoked: (bool didPop) async {
onPopInvokedWithResult: (bool didPop, _) async {
if (didPop) {
return;
}
Expand Down
8 changes: 4 additions & 4 deletions violet/lib/pages/article_info/article_info_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,17 @@ class ArticleInfoPage extends StatelessWidget {
height: Variables.articleInfoHeight,
child: Container(
color: Settings.themeWhat
? Colors.black.withOpacity(0.9)
: Colors.white.withOpacity(0.97),
? Colors.black.withValues(alpha: 0.9)
: Colors.white.withValues(alpha: 0.97),
child: ListView(
controller: data.controller,
children: [
Container(
width: width,
height: simpleInfoHeight(),
color: Settings.themeWhat
? Colors.grey.shade900.withOpacity(0.6)
: Colors.white.withOpacity(0.2),
? Colors.grey.shade900.withValues(alpha: 0.6)
: Colors.white.withValues(alpha: 0.2),
child: SimpleInfoWidget(),
),
buttonArea(context),
Expand Down
2 changes: 1 addition & 1 deletion violet/lib/pages/article_info/preview_area.dart
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class PreviewAreaWidget extends StatelessWidget {
child: Container(
padding: const EdgeInsets.only(bottom: 1),
width: double.infinity,
color: Colors.black.withOpacity(0.7),
color: Colors.black.withValues(alpha: 0.7),
child: Text(
'${index + 1} page',
textAlign: TextAlign.right,
Expand Down
4 changes: 2 additions & 2 deletions violet/lib/pages/artist_info/search_type2.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ class SearchType2 extends StatelessWidget {
boxShadow: [
BoxShadow(
color: Settings.themeWhat
? Colors.black.withOpacity(0.4)
: Colors.grey.withOpacity(0.2),
? Colors.black.withValues(alpha: 0.4)
: Colors.grey.withValues(alpha: 0.2),
spreadRadius: 1,
blurRadius: 1,
offset: const Offset(0, 3), // changes position of shadow
Expand Down
2 changes: 1 addition & 1 deletion violet/lib/pages/bookmark/bookmark_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ class _BookmarkPageState extends ThemeSwitchableState<BookmarkPage>
BoxShadow(
color: Settings.themeWhat
? Colors.black26
: Colors.grey.withOpacity(0.1),
: Colors.grey.withValues(alpha: 0.1),
spreadRadius: Settings.themeWhat ? 0 : 5,
blurRadius: 7,
offset: const Offset(0, 3), // changes position of shadow
Expand Down
5 changes: 3 additions & 2 deletions violet/lib/pages/bookmark/crop_bookmark.dart
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,9 @@ class _CropBookmarkPageState extends State<CropBookmarkPage> {
setState(() {});
}
},
highlightColor:
Theme.of(context).highlightColor.withOpacity(0.15),
highlightColor: Theme.of(context)
.highlightColor
.withValues(alpha: 0.15),
),
),
),
Expand Down
2 changes: 1 addition & 1 deletion violet/lib/pages/community/community_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ class _CommunityPageState extends State<CommunityPage>
BoxShadow(
color: Settings.themeWhat
? Colors.black26
: Colors.grey.withOpacity(0.1),
: Colors.grey.withValues(alpha: 0.1),
spreadRadius: Settings.themeWhat ? 0 : 5,
blurRadius: 7,
offset: const Offset(0, 3), // changes position of shadow
Expand Down
2 changes: 1 addition & 1 deletion violet/lib/pages/community/user_status_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ class _UserStatusCardState extends ThemeSwitchableState<UserStatusCard>
BoxShadow(
color: Settings.themeWhat
? Colors.black26
: Colors.grey.withOpacity(0.1),
: Colors.grey.withValues(alpha: 0.1),
spreadRadius: Settings.themeWhat ? 0 : 5,
blurRadius: 7,
offset: const Offset(0, 3), // changes position of shadow
Expand Down
2 changes: 1 addition & 1 deletion violet/lib/pages/community/user_status_card_dead.dart
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ class _UserStatusCardState extends State<UserStatusCard>
BoxShadow(
color: Settings.themeWhat
? Colors.black26
: Colors.grey.withOpacity(0.1),
: Colors.grey.withValues(alpha: 0.1),
spreadRadius: Settings.themeWhat ? 0 : 5,
blurRadius: 7,
offset: const Offset(0, 3), // changes position of shadow
Expand Down
4 changes: 2 additions & 2 deletions violet/lib/pages/download/download_item_menu.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ class DownloadImageMenu extends StatelessWidget {
boxShadow: [
BoxShadow(
color: Settings.themeWhat
? Colors.black.withOpacity(0.4)
: Colors.grey.withOpacity(0.2),
? Colors.black.withValues(alpha: 0.4)
: Colors.grey.withValues(alpha: 0.2),
spreadRadius: 1,
blurRadius: 1,
offset: const Offset(0, 3), // changes position of shadow
Expand Down
6 changes: 3 additions & 3 deletions violet/lib/pages/download/download_item_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -423,13 +423,13 @@ class DownloadItemWidgetState extends State<DownloadItemWidget>
? Palette.blackThemeBackground
: Colors.grey.shade800
: Colors.white70
: Colors.grey.withOpacity(0.3),
: Colors.grey.withValues(alpha: 0.3),
borderRadius: const BorderRadius.all(Radius.circular(5)),
boxShadow: [
BoxShadow(
color: Settings.themeWhat
? Colors.grey.withOpacity(0.08)
: Colors.grey.withOpacity(0.4),
? Colors.grey.withValues(alpha: 0.08)
: Colors.grey.withValues(alpha: 0.4),
spreadRadius: 5,
blurRadius: 7,
offset: const Offset(0, 3), // changes position of shadow
Expand Down
6 changes: 3 additions & 3 deletions violet/lib/pages/download/download_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ class _DownloadPageState extends ThemeSwitchableState<DownloadPage>
BoxShadow(
color: Settings.themeWhat
? Colors.black26
: Colors.grey.withOpacity(0.1),
: Colors.grey.withValues(alpha: 0.1),
spreadRadius: Settings.themeWhat ? 0 : 5,
blurRadius: 7,
offset: const Offset(0, 3), // changes position of shadow
Expand Down Expand Up @@ -722,8 +722,8 @@ class _DownloadPageState extends ThemeSwitchableState<DownloadPage>
color: Settings.themeWhat
? Settings.themeBlack
? Palette.blackThemeBackground
: Colors.grey.shade900.withOpacity(0.4)
: Colors.grey.shade200.withOpacity(0.4),
: Colors.grey.shade900.withValues(alpha: 0.4)
: Colors.grey.shade200.withValues(alpha: 0.4),
child: ListTile(
title: TextFormField(
cursorColor: Colors.black,
Expand Down
2 changes: 1 addition & 1 deletion violet/lib/pages/hot/hot_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ class _HotPageState extends ThemeSwitchableState<HotPage>
color: Settings.themeWhat
? Settings.themeBlack
? const Color(0xFF060606)
: Colors.grey.shade900.withOpacity(0.90)
: Colors.grey.shade900.withValues(alpha: 0.90)
: Colors.grey.shade50,
icon: Theme(
data: ThemeData(
Expand Down
2 changes: 1 addition & 1 deletion violet/lib/pages/lab/lab/bookmark/bookmarks.dart
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ class _BookmarkPageState extends State<LabBookmarkPage> {
BoxShadow(
color: Settings.themeWhat
? Colors.black26
: Colors.grey.withOpacity(0.1),
: Colors.grey.withValues(alpha: 0.1),
spreadRadius: Settings.themeWhat ? 0 : 5,
blurRadius: 7,
offset: const Offset(0, 3), // changes position of shadow
Expand Down
2 changes: 1 addition & 1 deletion violet/lib/pages/lab/lab/bookmark_spy.dart
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class _LabBookmarkSpyPageState extends State<LabBookmarkSpyPage> {
BoxShadow(
color: Settings.themeWhat
? Colors.black26
: Colors.grey.withOpacity(0.1),
: Colors.grey.withValues(alpha: 0.1),
spreadRadius: Settings.themeWhat ? 0 : 5,
blurRadius: 7,
offset: const Offset(0, 3),
Expand Down
3 changes: 2 additions & 1 deletion violet/lib/pages/lab/lab/recent_record.dart
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,8 @@ class _LabRecentRecordsState extends State<LabRecentRecords> {
max: 180,
min: 0,
divisions: (180 - 0),
inactiveColor: Settings.majorColor.withOpacity(0.7),
inactiveColor:
Settings.majorColor.withValues(alpha: 0.7),
activeColor: Settings.majorColor,
onChangeEnd: (value) async {
limit = value.toInt();
Expand Down
3 changes: 2 additions & 1 deletion violet/lib/pages/lab/lab/recent_record_u.dart
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,8 @@ class _LabRecentRecordsUState extends State<LabRecentRecordsU> {
max: 180,
min: 0,
divisions: (180 - 0),
inactiveColor: Settings.majorColor.withOpacity(0.7),
inactiveColor:
Settings.majorColor.withValues(alpha: 0.7),
activeColor: Settings.majorColor,
onChangeEnd: (value) async {
limit = value.toInt();
Expand Down
3 changes: 2 additions & 1 deletion violet/lib/pages/lab/lab/recent_user_record.dart
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,8 @@ class _LabUserRecentRecordsState extends State<LabUserRecentRecords> {
max: 180,
min: 0,
divisions: (180 - 0),
inactiveColor: Settings.majorColor.withOpacity(0.7),
inactiveColor:
Settings.majorColor.withValues(alpha: 0.7),
activeColor: Settings.majorColor,
onChangeEnd: (value) async {
limit = value.toInt();
Expand Down
3 changes: 2 additions & 1 deletion violet/lib/pages/lab/lab/top_recent.dart
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,8 @@ class _LabTopRecentState extends State<LabTopRecent> {
max: 30000,
min: 1,
divisions: (30000 - 1),
inactiveColor: Settings.majorColor.withOpacity(0.7),
inactiveColor:
Settings.majorColor.withValues(alpha: 0.7),
activeColor: Settings.majorColor,
onChangeEnd: (value) async {
limit = value.toInt();
Expand Down
2 changes: 1 addition & 1 deletion violet/lib/pages/lab/lab/user_bookmark_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class _LabUserBookmarkPageState extends State<LabUserBookmarkPage> {
BoxShadow(
color: Settings.themeWhat
? Colors.black26
: Colors.grey.withOpacity(0.1),
: Colors.grey.withValues(alpha: 0.1),
spreadRadius: Settings.themeWhat ? 0 : 5,
blurRadius: 7,
offset: const Offset(0, 3),
Expand Down
2 changes: 1 addition & 1 deletion violet/lib/pages/lab/lab_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ class _LaboratoryPageState extends State<LaboratoryPage> {
BoxShadow(
color: Settings.themeWhat
? Colors.black26
: Colors.grey.withOpacity(0.1),
: Colors.grey.withValues(alpha: 0.1),
spreadRadius: Settings.themeWhat ? 0 : 5,
blurRadius: 7,
offset: const Offset(0, 3), // changes position of shadow
Expand Down
4 changes: 2 additions & 2 deletions violet/lib/pages/search/search_bar_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ class _SearchBarPageState extends State<SearchBarPage>
// title: Slider(
// activeColor: Settings.majorColor,
// inactiveColor: Settings.majorColor
// .withOpacity(0.2),
// .withValues(alpha: 0.2),
// min: 60.0,
// max: 2000.0,
// divisions: (2000 - 60) ~/ 30,
Expand Down Expand Up @@ -793,7 +793,7 @@ class _SearchBarPageState extends State<SearchBarPage>
} else if (info.$1.group == 'series') {
color = Colors.cyan;
} else if (info.$1.group == 'artist' || info.$1.group == 'group') {
color = Colors.green.withOpacity(0.6);
color = Colors.green.withValues(alpha: 0.6);
} else if (info.$1.group == 'type' || info.$1.group == 'page') {
color = Colors.orange;
}
Expand Down
4 changes: 2 additions & 2 deletions violet/lib/pages/search/search_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -352,8 +352,8 @@ class _SearchPageState extends ThemeSwitchableState<SearchPage>
color: Settings.themeWhat
? Settings.themeBlack
? Palette.blackThemeBackground
: Colors.grey.shade900.withOpacity(0.4)
: Colors.grey.shade200.withOpacity(0.4),
: Colors.grey.shade900.withValues(alpha: 0.4)
: Colors.grey.shade200.withValues(alpha: 0.4),
child: ListTile(
title: textFormField,
leading: SizedBox(
Expand Down
4 changes: 2 additions & 2 deletions violet/lib/pages/search/search_result_selector.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ class SearchResultSelector extends StatelessWidget {
boxShadow: [
BoxShadow(
color: Settings.themeWhat
? Colors.black.withOpacity(0.4)
: Colors.grey.withOpacity(0.2),
? Colors.black.withValues(alpha: 0.4)
: Colors.grey.withValues(alpha: 0.2),
spreadRadius: 1,
blurRadius: 1,
offset: const Offset(0, 3), // changes position of shadow
Expand Down
2 changes: 1 addition & 1 deletion violet/lib/pages/segment/filter_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ class __ChipState extends State<_Chip> {
} else if (group == 'series') {
color = Colors.cyan;
} else if (group == 'artist' || group == 'group') {
color = Colors.green.withOpacity(0.6);
color = Colors.green.withValues(alpha: 0.6);
} else if (group == 'type') {
color = Colors.orange;
}
Expand Down
2 changes: 1 addition & 1 deletion violet/lib/pages/settings/bookmark_version_select.dart
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class _BookmarkVersionSelectPageState extends State<BookmarkVersionSelectPage> {
BoxShadow(
color: Settings.themeWhat
? Colors.black26
: Colors.grey.withOpacity(0.1),
: Colors.grey.withValues(alpha: 0.1),
spreadRadius: Settings.themeWhat ? 0 : 5,
blurRadius: 7,
offset: const Offset(0, 3),
Expand Down
4 changes: 2 additions & 2 deletions violet/lib/pages/settings/db_rebuild_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ class _DBRebuildPagePageState extends State<DBRebuildPage> {
boxShadow: [
BoxShadow(
color: Settings.themeWhat
? Colors.black.withOpacity(0.4)
: Colors.grey.withOpacity(0.2),
? Colors.black.withValues(alpha: 0.4)
: Colors.grey.withValues(alpha: 0.2),
spreadRadius: 1,
blurRadius: 1,
offset: const Offset(0, 3), // changes position of shadow
Expand Down
4 changes: 2 additions & 2 deletions violet/lib/pages/settings/import_from_eh.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ class _ImportFromEHPageState extends State<ImportFromEHPage> {
boxShadow: [
BoxShadow(
color: Settings.themeWhat
? Colors.black.withOpacity(0.4)
: Colors.grey.withOpacity(0.2),
? Colors.black.withValues(alpha: 0.4)
: Colors.grey.withValues(alpha: 0.2),
spreadRadius: 1,
blurRadius: 1,
offset: const Offset(0, 3), // changes position of shadow
Expand Down
2 changes: 1 addition & 1 deletion violet/lib/pages/settings/info_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ class _InfoPageState extends State<InfoPage> {
BoxShadow(
color: Settings.themeWhat
? Colors.black26
: Colors.grey.withOpacity(0.1),
: Colors.grey.withValues(alpha: 0.1),
spreadRadius: Settings.themeWhat ? 0 : 5,
blurRadius: 7,
offset: const Offset(0, 3), // changes position of shadow
Expand Down
6 changes: 3 additions & 3 deletions violet/lib/pages/settings/log_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,10 @@ class _LogPageState extends State<LogPage> {
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10.0),
color: ii.isError == false && ii.isWarning == false
? Colors.greenAccent.withOpacity(0.8)
? Colors.greenAccent.withValues(alpha: 0.8)
: ii.isWarning
? Colors.orangeAccent.withOpacity(0.8)
: Colors.redAccent.withOpacity(0.8),
? Colors.orangeAccent.withValues(alpha: 0.8)
: Colors.redAccent.withValues(alpha: 0.8),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
Expand Down
Loading
Loading