diff --git a/lib/models/models.dart b/lib/models/models.dart index 5739428..edccc97 100644 --- a/lib/models/models.dart +++ b/lib/models/models.dart @@ -4,3 +4,4 @@ export 'sponsorships_model.dart'; export 'segment_model.dart'; export 'download_result_model.dart'; export 'download_model.dart'; +export 'option_model.dart'; diff --git a/lib/models/option_model.dart b/lib/models/option_model.dart new file mode 100644 index 0000000..95e98c4 --- /dev/null +++ b/lib/models/option_model.dart @@ -0,0 +1,9 @@ +class Option { + final T value; + final String label; + + Option({ + required this.value, + required this.label, + }); +} diff --git a/lib/widgets/download_tile.dart b/lib/widgets/download_tile.dart index f69b6ee..67ee313 100644 --- a/lib/widgets/download_tile.dart +++ b/lib/widgets/download_tile.dart @@ -89,7 +89,7 @@ class DownloadTile extends StatelessWidget { '${_download.progress.value}%', style: const TextStyle( color: AppColors.white, - fontSize: 12, + fontSize: 10, fontWeight: FontWeight.w700, ), ), diff --git a/lib/widgets/navigation.dart b/lib/widgets/navigation.dart index dae6496..d26584a 100644 --- a/lib/widgets/navigation.dart +++ b/lib/widgets/navigation.dart @@ -21,7 +21,7 @@ class Navigation extends StatelessWidget { @override Widget build(BuildContext context) { return Obx(() => AnimatedContainer( - duration: const Duration(milliseconds: 150), + duration: const Duration(milliseconds: 200), height: _barheight, padding: const EdgeInsets.all(_margin * 2), child: Stack( @@ -82,10 +82,10 @@ class Navigation extends StatelessWidget { child: _buildButton( AppIcons.settingsCog, 'Settings', - () => Get.bottomSheet( - SettingsModalSheet(), - backgroundColor: AppColors.black, - ), + () => Get.bottomSheet(SettingsModalSheet(), + backgroundColor: AppColors.black, + exitBottomSheetDuration: const Duration(milliseconds: 250), + enterBottomSheetDuration: const Duration(milliseconds: 250)), false, ), ), diff --git a/lib/widgets/select_modal_sheet.dart b/lib/widgets/select_modal_sheet.dart new file mode 100644 index 0000000..b3ae6e4 --- /dev/null +++ b/lib/widgets/select_modal_sheet.dart @@ -0,0 +1,74 @@ +import 'package:flutter/material.dart'; +import 'package:get/get.dart'; +import 'package:youtube_downloader/models/models.dart'; +import 'package:youtube_downloader/utils/colors.dart'; + +class SelectModalSheet extends StatelessWidget { + final String _title; + final List> _options; + final Function _onSelected; + final T _selected; + + late Rx