Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: minor fixes regarding app name and ui #12

Merged
merged 6 commits into from
Jan 18, 2025
Merged
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 android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ if (flutterVersionName == null) {
}

android {
namespace = "com.example.spotifycollab"
namespace = "com.example.collabify"
compileSdk = flutter.compileSdkVersion
ndkVersion = flutter.ndkVersion

Expand All @@ -35,7 +35,7 @@ android {

defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId = "com.example.spotifycollab"
applicationId = "com.example.collabify"
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
minSdk = flutter.minSdkVersion
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.example.spotifycollab
package com.example.collabify

import io.flutter.embedding.android.FlutterActivity

Expand Down
12 changes: 6 additions & 6 deletions ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.ssaakaash.spotifycollab;
PRODUCT_BUNDLE_IDENTIFIER = com.ssaakaash.collabify;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;
Expand All @@ -495,7 +495,7 @@
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.example.spotifycollab.RunnerTests;
PRODUCT_BUNDLE_IDENTIFIER = com.example.collabify.RunnerTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
Expand All @@ -513,7 +513,7 @@
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.example.spotifycollab.RunnerTests;
PRODUCT_BUNDLE_IDENTIFIER = com.example.collabify.RunnerTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
Expand All @@ -529,7 +529,7 @@
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.example.spotifycollab.RunnerTests;
PRODUCT_BUNDLE_IDENTIFIER = com.example.collabify.RunnerTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
Expand Down Expand Up @@ -661,7 +661,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.ssaakaash.spotifycollab;
PRODUCT_BUNDLE_IDENTIFIER = com.ssaakaash.collabify;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
Expand All @@ -684,7 +684,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.ssaakaash.spotifycollab;
PRODUCT_BUNDLE_IDENTIFIER = com.ssaakaash.collabify;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;
Expand Down
6 changes: 3 additions & 3 deletions ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>Spotifycollab</string>
<string>collabify</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>spotifycollab</string>
<string>collabify</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
Expand Down Expand Up @@ -49,7 +49,7 @@
<array>
<dict>
<key>CFBundleURLName</key>
<string>com.example.spotifycollab</string>
<string>com.example.collabify</string>
<key>CFBundleURLSchemes</key>
<array>
<string>collabify</string>
Expand Down
17 changes: 13 additions & 4 deletions lib/providers/create_screen_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,19 @@ class CreateScreenNotifier extends StateNotifier<AsyncValue<void>> {
try {
state = const AsyncValue.loading();

final formData = FormData.fromMap({
'name': name,
'image': await MultipartFile.fromFile(image!.path),
});
final FormData formData;

if (image != null) {
formData = FormData.fromMap({
'name': name,
'image': await MultipartFile.fromFile(image.path),
});
} else {
formData = FormData.fromMap({
'name': name,
});
}

final response = await apiUtil.post(
'/v1/playlists',
formData,
Expand Down
172 changes: 103 additions & 69 deletions lib/view/screens/admin_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ class _AdminScreenState extends ConsumerState<AdminScreen>
automaticallyImplyLeading: false,
title: IconButton(
onPressed: () {
ref.read(tabProvider.notifier).state = 0;
context.pop();
},
iconSize: 16,
Expand All @@ -96,13 +97,34 @@ class _AdminScreenState extends ConsumerState<AdminScreen>
showDialog(
context: context,
builder: (context) => AlertDialog(
title: const Text('Delete Playlist'),
title: const Text(
'Delete Playlist',
style: TextStyle(
fontFamily: 'Gotham',
color: Colors.white,
fontWeight: FontWeight.w600,
fontSize: 16,
),
),
content: const Text(
'Are you sure you want to delete this playlist?'),
'Are you sure you want to delete this playlist?',
style: TextStyle(
fontFamily: 'Gotham',
color: Colors.white,
fontWeight: FontWeight.w400,
fontSize: 14,
),
),
actions: [
TextButton(
onPressed: () => Navigator.pop(context),
child: const Text('Cancel'),
child: const Text(
'Cancel',
style: TextStyle(
fontFamily: 'Gotham',
fontWeight: FontWeight.w600,
),
),
),
TextButton(
onPressed: () async {
Expand Down Expand Up @@ -172,8 +194,14 @@ class _AdminScreenState extends ConsumerState<AdminScreen>
break;
}
},
child: const Text('Delete',
style: TextStyle(color: Colors.red)),
child: const Text(
'Delete',
style: TextStyle(
color: Colors.red,
fontFamily: 'Gotham',
fontWeight: FontWeight.w600,
),
),
),
],
),
Expand Down Expand Up @@ -307,51 +335,54 @@ class _AdminScreenState extends ConsumerState<AdminScreen>
style: TextStyle(
fontFamily: 'Gotham',
color: Colors.white,
fontWeight: FontWeight.w600,
fontWeight: FontWeight.w500,
fontSize: 14,
),
),
)
: Padding(
padding:
const EdgeInsets.symmetric(vertical: 8.0, horizontal: 16.0),
child: Column(
children: [
Expanded(
child: ListView.separated(
itemCount: items.length,
separatorBuilder: (context, index) => const Divider(
color: Color(0xFFCCCCCC),
height: 1,
: RefreshIndicator(
onRefresh: _fetchSongs,
child: Padding(
padding:
const EdgeInsets.symmetric(vertical: 8.0, horizontal: 16.0),
child: Column(
children: [
Expanded(
child: ListView.separated(
itemCount: items.length,
separatorBuilder: (context, index) => const Divider(
color: Color(0xFFCCCCCC),
height: 1,
),
itemBuilder: (context, index) {
final item = items[index];
return isPlaylist
? MusicListItem(
id: item.track!.track!.id!,
title: item.track!.track!.name!,
subtitle: item.track!.track!.artists!
.map((artist) => artist.name!)
.join(', '),
imageUrl:
item.track!.track!.album!.images![0].url!,
isPlaylist: isPlaylist,
isRequest: isRequest,
isParticipant: isParticipant,
)
: MusicListItem(
id: item.track!.track!.id!,
title: item.track!.track!.album!.name!,
subtitle: null,
imageUrl: null,
isPlaylist: isPlaylist,
isRequest: isRequest,
isParticipant: isParticipant,
);
},
),
itemBuilder: (context, index) {
final item = items[index];
return isPlaylist
? MusicListItem(
id: item.track!.track!.id!,
title: item.track!.track!.name!,
subtitle: item.track!.track!.artists!
.map((artist) => artist.name!)
.join(', '),
imageUrl:
item.track!.track!.album!.images![0].url!,
isPlaylist: isPlaylist,
isRequest: isRequest,
isParticipant: isParticipant,
)
: MusicListItem(
id: item.track!.track!.id!,
title: item.track!.track!.album!.name!,
subtitle: null,
imageUrl: null,
isPlaylist: isPlaylist,
isRequest: isRequest,
isParticipant: isParticipant,
);
},
),
),
],
],
),
),
);
}
Expand All @@ -365,37 +396,40 @@ class _AdminScreenState extends ConsumerState<AdminScreen>
style: TextStyle(
fontFamily: 'Gotham',
color: Colors.white,
fontWeight: FontWeight.w600,
fontWeight: FontWeight.w500,
fontSize: 14,
),
),
)
: Column(
children: [
Expanded(
child: ListView.separated(
padding: const EdgeInsets.symmetric(
vertical: 8.0, horizontal: 16.0),
itemCount: items.length,
separatorBuilder: (context, index) => const Divider(
color: Color(0xFFCCCCCC),
height: 1,
: RefreshIndicator(
onRefresh: _fetchSongs,
child: Column(
children: [
Expanded(
child: ListView.separated(
padding: const EdgeInsets.symmetric(
vertical: 8.0, horizontal: 16.0),
itemCount: items.length,
separatorBuilder: (context, index) => const Divider(
color: Color(0xFFCCCCCC),
height: 1,
),
itemBuilder: (context, index) {
final item = items[index];
return MusicListItem(
id: item.id!,
title: item.name!,
subtitle: item.artists!
.map((artist) => artist.name!)
.join(', '),
imageUrl: item.album!.images![0].url!,
isRequest: true,
);
},
),
itemBuilder: (context, index) {
final item = items[index];
return MusicListItem(
id: item.id!,
title: item.name!,
subtitle: item.artists!
.map((artist) => artist.name!)
.join(', '),
imageUrl: item.album!.images![0].url!,
isRequest: true,
);
},
),
),
],
],
),
);
}
}
20 changes: 18 additions & 2 deletions lib/view/screens/home_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,15 @@ class HomeScreen extends ConsumerWidget {
const SizedBox(height: 10),
if (playlists.ownedPlaylists.isEmpty)
const Center(
child: Text('No events. Create one!'))
child: Text(
'No events. Create one!',
style: TextStyle(
fontFamily: "Gotham",
fontWeight: FontWeight.w500,
fontSize: 14,
),
),
)
else
ListView.separated(
shrinkWrap: true,
Expand Down Expand Up @@ -111,7 +119,15 @@ class HomeScreen extends ConsumerWidget {
const SizedBox(height: 10),
if (playlists.memberPlaylists.isEmpty)
const Center(
child: Text('No events. Join one!'))
child: Text(
'No events. Join one!',
style: TextStyle(
fontFamily: "Gotham",
fontWeight: FontWeight.w500,
fontSize: 14,
),
),
)
else
ListView.separated(
shrinkWrap: true,
Expand Down
Loading
Loading