Skip to content

Commit

Permalink
changelog:
Browse files Browse the repository at this point in the history
changed splash screen background color
improved code
  • Loading branch information
gokadzev committed Jul 27, 2022
1 parent 78816f7 commit 9d1c628
Show file tree
Hide file tree
Showing 20 changed files with 172 additions and 160 deletions.
3 changes: 3 additions & 0 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ linter:
- avoid_function_literals_in_foreach_calls
- avoid_init_to_null
- avoid_null_checks_in_equality_operators
- avoid_print
- avoid_relative_lib_imports
- avoid_renaming_method_parameters
- avoid_return_types_on_setters
Expand Down Expand Up @@ -38,6 +39,7 @@ linter:
- list_remove_unrelated_type
- no_adjacent_strings_in_list
- no_duplicate_case_values
- no_logic_in_create_state
- non_constant_identifier_names
- noop_primitive_operations
- null_closures
Expand All @@ -64,6 +66,7 @@ linter:
- recursive_getters
- sized_box_for_whitespace
- slash_for_doc_comments
- sort_child_properties_last
- test_types_in_equals
- throw_in_finally
- type_init_formals
Expand Down
Binary file modified android/app/src/main/res/drawable-v21/background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/drawable/background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion android/app/src/main/res/values-v31/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<item name="android:forceDarkAllowed">false</item>
<item name="android:windowFullscreen">false</item>
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
<item name="android:windowSplashScreenBackground">#202020</item>
<item name="android:windowSplashScreenBackground">#151515</item>
<item name="android:windowSplashScreenAnimatedIcon">@drawable/android12splash</item>
</style>
<!-- Theme applied to the Android Window as soon as the process has started.
Expand Down
2 changes: 1 addition & 1 deletion assets/db/playlists.db.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"subtitle": "Just Updated",
"header_desc": "TikTok Songs 2022 - Tik Tok Music - Best TikTok Songs 2022 Every week, we update our playlist with the latest hits. The",
"type": "playlist",
"image": "https://i.scdn.co/image/ab67706c0000bebb3370b1ca7d62d51bd97c15e1",
"image": "https://i.scdn.co/image/ab67616d0000b2739da92b8aa7cbcd57a20fe10e",
"list": []
},
{
Expand Down
4 changes: 2 additions & 2 deletions flutter_native_splash.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
flutter_native_splash:
image: assets/images/splash.png
color: "202020"
color: "151515"


android_12:
image: assets/images/splash.png
color: "202020"
color: "151515"
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 7 additions & 4 deletions lib/API/musify.dart
Original file line number Diff line number Diff line change
Expand Up @@ -275,11 +275,14 @@ Future<List<SongModel>> getLocalSongs() async {
// SongSortType.TITLE,
// OrderType.ASC_OR_SMALLER,
// UriType.EXTERNAL,
if (await Permission.storage.request().isGranted) {
localSongs = await _audioQuery.querySongs(uriType: UriType.EXTERNAL);
localSongs.addAll(await _audioQuery.querySongs(
path: await ExtStorageProvider.getExtStorage(dirName: 'Musify')));
if (localSongs.isEmpty) {
if (await Permission.storage.request().isGranted) {
localSongs = await _audioQuery.querySongs(uriType: UriType.EXTERNAL);
localSongs.addAll(await _audioQuery.querySongs(
path: await ExtStorageProvider.getExtStorage(dirName: 'Musify')));
}
}

return localSongs;
}

Expand Down
195 changes: 101 additions & 94 deletions lib/customWidgets/custom_animated_bottom_bar.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import 'package:flutter/material.dart';
import 'package:musify/ui/rootPage.dart';

class CustomAnimatedBottomBar extends StatelessWidget {
CustomAnimatedBottomBar({
Key? key,
this.selectedIndex = 0,
this.showElevation = true,
this.onTap,
this.selectedItemColor,
Expand All @@ -21,7 +21,6 @@ class CustomAnimatedBottomBar extends StatelessWidget {
final Color? backgroundColor;
final bool showElevation;
final List<BottomNavBarItem> items;
final int selectedIndex;
final Function(int)? onTap;
final Color? selectedItemColor;
final Color? unselectedItemColor;
Expand Down Expand Up @@ -51,108 +50,116 @@ class CustomAnimatedBottomBar extends StatelessWidget {
),
child: SafeArea(
minimum: margin,
child: Row(
mainAxisAlignment: items.length <= 2
? MainAxisAlignment.spaceEvenly
: MainAxisAlignment.spaceBetween,
children: [
for (final item in items)
TweenAnimationBuilder<double>(
tween: Tween(
end: items.indexOf(item) == selectedIndex ? 1.0 : 0.0,
),
curve: curve,
duration: duration,
builder: (context, t, _) {
final _selectedColor = item.activeColor ?? selectedItemColor;
child: ValueListenableBuilder<int>(
valueListenable: activeTab,
builder: (_, value, __) {
return Row(
mainAxisAlignment: items.length <= 2
? MainAxisAlignment.spaceEvenly
: MainAxisAlignment.spaceBetween,
children: [
for (final item in items)
TweenAnimationBuilder<double>(
tween: Tween(
end: items.indexOf(item) == value ? 1.0 : 0.0,
),
curve: curve,
duration: duration,
builder: (context, t, _) {
final _selectedColor =
item.activeColor ?? selectedItemColor;

final _unselectedColor =
item.inactiveColor ?? unselectedItemColor;
final _unselectedColor =
item.inactiveColor ?? unselectedItemColor;

return Material(
color: Color.lerp(
_selectedColor!.withOpacity(0.0),
_selectedColor.withOpacity(selectedColorOpacity ?? 0.1),
t,
),
shape: itemShape,
child: InkWell(
onTap: () => onTap?.call(items.indexOf(item)),
customBorder: itemShape,
focusColor: _selectedColor.withOpacity(0.1),
highlightColor: _selectedColor.withOpacity(0.1),
splashColor: _selectedColor.withOpacity(0.1),
hoverColor: _selectedColor.withOpacity(0.1),
child: Padding(
padding: Localizations.localeOf(context) ==
const Locale('en', '')
? itemPadding -
(Directionality.of(context) == TextDirection.ltr
? EdgeInsets.only(
right: itemPadding.right * t,
)
: EdgeInsets.only(
left: itemPadding.left * t,
))
: const EdgeInsets.all(10.0),
child: Row(
children: [
IconTheme(
data: IconThemeData(
color: Color.lerp(
_unselectedColor,
_selectedColor,
t,
return Material(
color: Color.lerp(
_selectedColor!.withOpacity(0.0),
_selectedColor
.withOpacity(selectedColorOpacity ?? 0.1),
t,
),
shape: itemShape,
child: InkWell(
onTap: () => onTap?.call(items.indexOf(item)),
customBorder: itemShape,
focusColor: _selectedColor.withOpacity(0.1),
highlightColor: _selectedColor.withOpacity(0.1),
splashColor: _selectedColor.withOpacity(0.1),
hoverColor: _selectedColor.withOpacity(0.1),
child: Padding(
padding: Localizations.localeOf(context) ==
const Locale('en', '')
? itemPadding -
(Directionality.of(context) ==
TextDirection.ltr
? EdgeInsets.only(
right: itemPadding.right * t,
)
: EdgeInsets.only(
left: itemPadding.left * t,
))
: const EdgeInsets.all(10.0),
child: Row(
children: [
IconTheme(
data: IconThemeData(
color: Color.lerp(
_unselectedColor,
_selectedColor,
t,
),
size: 24,
),
child: items.indexOf(item) == value
? item.activeIcon ?? item.icon
: item.icon,
),
size: 24,
),
child: items.indexOf(item) == selectedIndex
? item.activeIcon ?? item.icon
: item.icon,
),
if (Localizations.localeOf(context) ==
const Locale('en', ''))
ClipRect(
clipBehavior: Clip.antiAlias,
child: SizedBox(
height: 20,
child: Align(
alignment: const Alignment(-0.2, 0.0),
widthFactor: t,
child: Padding(
padding: Directionality.of(context) ==
TextDirection.ltr
? EdgeInsets.only(
left: itemPadding.left / 2,
right: itemPadding.right,
)
: EdgeInsets.only(
left: itemPadding.left,
right: itemPadding.right / 2,
if (Localizations.localeOf(context) ==
const Locale('en', ''))
ClipRect(
clipBehavior: Clip.antiAlias,
child: SizedBox(
height: 20,
child: Align(
alignment: const Alignment(-0.2, 0.0),
widthFactor: t,
child: Padding(
padding: Directionality.of(context) ==
TextDirection.ltr
? EdgeInsets.only(
left: itemPadding.left / 2,
right: itemPadding.right,
)
: EdgeInsets.only(
left: itemPadding.left,
right: itemPadding.right / 2,
),
child: DefaultTextStyle(
style: TextStyle(
color: Color.lerp(
_selectedColor.withOpacity(0.0),
_selectedColor,
t,
),
fontWeight: FontWeight.w600,
),
child: DefaultTextStyle(
style: TextStyle(
color: Color.lerp(
_selectedColor.withOpacity(0.0),
_selectedColor,
t,
child: item.title,
),
fontWeight: FontWeight.w600,
),
child: item.title,
),
),
),
),
),
],
],
),
),
),
),
),
);
},
),
],
);
},
),
],
);
},
),
),
);
Expand Down
2 changes: 1 addition & 1 deletion lib/customWidgets/delayed_display.dart
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,11 @@ class _DelayedDisplayState extends State<DelayedDisplay>
@override
Widget build(BuildContext context) {
return FadeTransition(
opacity: _opacityController,
child: SlideTransition(
position: _slideAnimationOffset,
child: widget.child,
),
opacity: _opacityController,
);
}
}
6 changes: 3 additions & 3 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ class _MyAppState extends State<MyApp> {
debugShowCheckedModeBanner: false,
theme: ThemeData(
appBarTheme: const AppBarTheme(backgroundColor: Colors.black),
scaffoldBackgroundColor: const Color(0xFF121212),
backgroundColor: const Color(0xFF121212),
primaryColor: Colors.black,
scaffoldBackgroundColor: bgColor,
backgroundColor: bgColor,
primaryColor: const Color(0xFF000000),
canvasColor: bgColor,
visualDensity: VisualDensity.adaptivePlatformDensity,
fontFamily: 'Ubuntu',
Expand Down
6 changes: 3 additions & 3 deletions lib/ui/homePage.dart
Original file line number Diff line number Diff line change
Expand Up @@ -200,10 +200,10 @@ class CubeContainer extends StatelessWidget {
errorWidget: (context, url, error) => DecoratedBox(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10.0),
gradient: LinearGradient(
gradient: const LinearGradient(
colors: [
accent.withAlpha(30),
Colors.white.withAlpha(30)
Color.fromARGB(30, 255, 255, 255),
Color.fromARGB(30, 233, 233, 233),
],
),
),
Expand Down
9 changes: 4 additions & 5 deletions lib/ui/localSongsPage.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class LocalSongsPage extends StatelessWidget {
Row(
children: [
Container(
margin: const EdgeInsets.only(left: 10.0, right: 10.0),
margin: const EdgeInsets.only(left: 10.0, right: 26.0),
height: 200.0,
width: 200.0,
child: Card(
Expand All @@ -49,10 +49,10 @@ class LocalSongsPage extends StatelessWidget {
height: 200,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10.0),
gradient: LinearGradient(
gradient: const LinearGradient(
colors: [
accent.withAlpha(30),
Colors.white.withAlpha(30)
Color.fromARGB(30, 255, 255, 255),
Color.fromARGB(30, 233, 233, 233),
],
),
),
Expand All @@ -74,7 +74,6 @@ class LocalSongsPage extends StatelessWidget {
),
),
),
const SizedBox(width: 16.0),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
Expand Down
6 changes: 3 additions & 3 deletions lib/ui/player.dart
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,10 @@ class AudioAppState extends State<AudioApp> {
height: size.width / 1.2,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10.0),
gradient: LinearGradient(
gradient: const LinearGradient(
colors: [
accent.withAlpha(30),
Colors.white.withAlpha(30)
Color.fromARGB(30, 255, 255, 255),
Color.fromARGB(30, 233, 233, 233),
],
),
),
Expand Down
Loading

0 comments on commit 9d1c628

Please sign in to comment.