Skip to content

Commit

Permalink
Update to 3.13
Browse files Browse the repository at this point in the history
  • Loading branch information
RblSb committed Oct 13, 2023
1 parent 23906b3 commit 420f9c9
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 172 deletions.
6 changes: 5 additions & 1 deletion lib/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -266,10 +266,11 @@ class _AppState extends State<App> with WidgetsBindingObserver {

Future<AddVideo?> _addUrlDialog(BuildContext context) async {
final clipboard = await Clipboard.getData('text/plain');
final defaultUrl = 'http://';
final defaultUrl = '';
var url = defaultUrl;
final clipboardText = clipboard?.text ?? '';
if (clipboardText.contains('mp4') ||
clipboardText.contains('mp3') ||
clipboardText.contains('m3u8') ||
clipboardText.contains('youtu')) {
url = clipboardText;
Expand All @@ -289,9 +290,12 @@ class _AppState extends State<App> with WidgetsBindingObserver {
final addVideo = await showDialog<AddVideo>(
context: context,
builder: (BuildContext context) {
final bgAlpha = app.playlist.isEmpty() ? 255 : 200;
return StatefulBuilder(
builder: (context, setState) {
return AlertDialog(
backgroundColor:
Theme.of(context).dialogBackgroundColor.withAlpha(bgAlpha),
insetPadding: EdgeInsets.zero,
scrollable: true,
content: SingleChildScrollView(
Expand Down
1 change: 0 additions & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ class Main extends StatelessWidget {
colorScheme: ColorScheme.fromSwatch(
brightness: Brightness.dark,
primarySwatch: Colors.blue,
primaryColorDark: Colors.grey[900],
accentColor: Colors.grey[300],
cardColor: Color.fromARGB(255, 30, 30, 30),
backgroundColor: Color.fromARGB(255, 15, 15, 15),
Expand Down
Loading

0 comments on commit 420f9c9

Please sign in to comment.