forked from Jackiu1997/pure_live
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat: add about / donate / projects info
- Loading branch information
1 parent
4b6a5b4
commit f6be507
Showing
28 changed files
with
717 additions
and
244 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
Binary file not shown.
Binary file not shown.
File renamed without changes
File renamed without changes
File renamed without changes
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 |
---|---|---|
|
@@ -6,6 +6,17 @@ class VersionUtil { | |
static const String projectUrl = 'https://github.com/Jackiu1997/hot_live'; | ||
static const String releaseUrl = | ||
'https://api.github.com/repos/Jackiu1997/hot_live/releases'; | ||
static const String issuesUrl = | ||
'https://github.com/Jackiu1997/hot_live/issues'; | ||
static const String kanbanUrl = | ||
'https://jackiu-notes.notion.site/50bc0d3d377445eea029c6e3d4195671?v=663125e639b047cea5e69d8264926b8b'; | ||
|
||
static const String githubUrl = 'https://github.com/Jackiu1997'; | ||
static const String email = '[email protected]'; | ||
static const String emailUrl = | ||
'mailto:[email protected]?subject=HotLive Feedback'; | ||
static const String telegramGroup = 't.me/pure_live_channel'; | ||
static const String telegramGroupUrl = 'https://t.me/pure_live_channel'; | ||
|
||
static String latestVersion = version; | ||
static String latestUpdateLog = ''; | ||
|
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,89 @@ | ||
import 'package:hot_live/common/index.dart'; | ||
import 'package:hot_live/pages/index.dart'; | ||
|
||
class MenuButton extends StatelessWidget { | ||
const MenuButton({Key? key}) : super(key: key); | ||
|
||
final menuRoutes = const [ | ||
SettingsPage(), | ||
AboutPage(), | ||
AboutPage(), | ||
]; | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return PopupMenuButton( | ||
tooltip: 'menu', | ||
color: Theme.of(context).colorScheme.surfaceVariant, | ||
shape: RoundedRectangleBorder( | ||
borderRadius: BorderRadius.circular(8), | ||
), | ||
offset: const Offset(12, 0), | ||
position: PopupMenuPosition.under, | ||
icon: const Icon(Icons.menu_rounded), | ||
onSelected: (int index) => Navigator.push( | ||
context, | ||
MaterialPageRoute(builder: (context) => menuRoutes[index]), | ||
), | ||
itemBuilder: (context) => [ | ||
PopupMenuItem( | ||
value: 0, | ||
padding: const EdgeInsets.symmetric(horizontal: 12), | ||
child: MenuListTile( | ||
leading: const Icon(Icons.settings_rounded), | ||
text: S.of(context).settings_title, | ||
), | ||
), | ||
PopupMenuItem( | ||
value: 1, | ||
padding: const EdgeInsets.symmetric(horizontal: 12), | ||
child: MenuListTile( | ||
leading: const Icon(Icons.info_outline_rounded), | ||
text: S.of(context).about, | ||
), | ||
), | ||
PopupMenuItem( | ||
value: 2, | ||
padding: const EdgeInsets.symmetric(horizontal: 12), | ||
child: MenuListTile( | ||
leading: const Icon(Icons.help_outline_rounded), | ||
text: S.of(context).help, | ||
), | ||
), | ||
], | ||
); | ||
} | ||
} | ||
|
||
class MenuListTile extends StatelessWidget { | ||
final Widget? leading; | ||
final String text; | ||
final Widget? trailing; | ||
|
||
const MenuListTile({ | ||
Key? key, | ||
required this.leading, | ||
required this.text, | ||
this.trailing, | ||
}) : super(key: key); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Row( | ||
children: [ | ||
if (leading != null) ...[ | ||
leading!, | ||
const SizedBox(width: 12), | ||
], | ||
Text( | ||
text, | ||
style: Theme.of(context).textTheme.labelMedium, | ||
), | ||
if (trailing != null) ...[ | ||
const SizedBox(width: 24), | ||
trailing!, | ||
], | ||
], | ||
); | ||
} | ||
} |
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,25 @@ | ||
import 'package:hot_live/common/index.dart'; | ||
import 'package:hot_live/pages/index.dart'; | ||
|
||
class SearchButton extends StatelessWidget { | ||
const SearchButton({Key? key}) : super(key: key); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Row( | ||
mainAxisSize: MainAxisSize.min, | ||
children: [ | ||
IconButton( | ||
onPressed: () { | ||
Navigator.push( | ||
context, | ||
MaterialPageRoute(builder: (context) => const SearchPage()), | ||
); | ||
}, | ||
icon: const Icon(CustomIcons.search), | ||
), | ||
const SizedBox(width: 4), | ||
], | ||
); | ||
} | ||
} |
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,61 @@ | ||
import 'package:flutter/cupertino.dart'; | ||
import 'package:flutter/material.dart'; | ||
|
||
class CupertinoSwitchListTile extends StatelessWidget { | ||
const CupertinoSwitchListTile({ | ||
Key? key, | ||
required this.value, | ||
required this.onChanged, | ||
this.leading, | ||
this.title, | ||
this.subtitle, | ||
this.activeColor, | ||
}) : super(key: key); | ||
|
||
final Widget? leading; | ||
final Widget? title; | ||
final Widget? subtitle; | ||
final Color? activeColor; | ||
final bool value; | ||
final void Function(bool)? onChanged; | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return ListTile( | ||
leading: leading, | ||
title: title, | ||
subtitle: subtitle, | ||
onTap: () { | ||
if (onChanged != null) onChanged!(!value); | ||
}, | ||
trailing: CupertinoSwitch( | ||
value: value, | ||
activeColor: activeColor, | ||
onChanged: onChanged, | ||
), | ||
); | ||
} | ||
} | ||
|
||
class SectionTitle extends StatelessWidget { | ||
final String title; | ||
|
||
const SectionTitle({ | ||
required this.title, | ||
Key? key, | ||
}) : super(key: key); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return ListTile( | ||
contentPadding: const EdgeInsets.symmetric(horizontal: 16, vertical: 4), | ||
title: Text( | ||
title, | ||
style: Theme.of(context).textTheme.headlineSmall?.copyWith( | ||
color: Theme.of(context).colorScheme.primary, | ||
fontWeight: FontWeight.w500, | ||
), | ||
), | ||
); | ||
} | ||
} |
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
Oops, something went wrong.