Skip to content
Open
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: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
.buildlog/
.history
.svn/
functions/
node_modules/
package-lock.json
yarn.lock
migrate_working_dir/

# IntelliJ related
Expand Down
3 changes: 3 additions & 0 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ if (flutterVersionName == null) {
}

apply plugin: 'com.android.application'
// START: FlutterFire Configuration
apply plugin: 'com.google.gms.google-services'
// END: FlutterFire Configuration
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

Expand Down
29 changes: 29 additions & 0 deletions android/app/google-services.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"project_info": {
"project_number": "667209165373",
"project_id": "mpl-lab-67b9c",
"storage_bucket": "mpl-lab-67b9c.firebasestorage.app"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:667209165373:android:24936b030b185d9086d854",
"android_client_info": {
"package_name": "com.example.event_management_app"
}
},
"oauth_client": [],
"api_key": [
{
"current_key": "AIzaSyBZrRJ1DmwqUkn-xn71DKms85gVwjF9yDc"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": []
}
}
}
],
"configuration_version": "1"
}
3 changes: 3 additions & 0 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ buildscript {
}

dependencies {
// START: FlutterFire Configuration
classpath 'com.google.gms:google-services:4.3.15'
// END: FlutterFire Configuration
classpath 'com.android.tools.build:gradle:7.3.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
Expand Down
1 change: 1 addition & 0 deletions firebase.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"flutter":{"platforms":{"android":{"default":{"projectId":"mpl-lab-67b9c","appId":"1:667209165373:android:24936b030b185d9086d854","fileOutput":"android/app/google-services.json"}},"dart":{"lib/firebase_options.dart":{"projectId":"mpl-lab-67b9c","configurations":{"android":"1:667209165373:android:24936b030b185d9086d854","ios":"1:667209165373:ios:fc00bdd373357f0b86d854","macos":"1:667209165373:ios:fc00bdd373357f0b86d854","web":"1:667209165373:web:0a27a005d720b23886d854","windows":"1:667209165373:web:8d1e84b8e18bb34586d854"}}}}}}
Binary file added flutter_01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
53 changes: 0 additions & 53 deletions lib/auth.dart

This file was deleted.

2 changes: 1 addition & 1 deletion lib/containers/custom_headtext.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class _CustomHeadTextState extends State<CustomHeadText> {
Widget build(BuildContext context) {
return Text(
widget.text,
style: TextStyle(
style: const TextStyle(
color: kLightGreen, fontSize: 32, fontWeight: FontWeight.w600),
);
}
Expand Down
154 changes: 63 additions & 91 deletions lib/containers/event_container.dart
Original file line number Diff line number Diff line change
@@ -1,115 +1,87 @@
import 'package:appwrite/models.dart';
import 'package:event_management_app/containers/format_datetime.dart';
import 'package:event_management_app/views/event_details.dart';

import 'package:flutter/material.dart';
import 'package:event_management_app/containers/format_datetime.dart';

class EventContainer extends StatelessWidget {
final Document data;
const EventContainer({super.key, required this.data});
final String eventName;
final DateTime eventDate;
final String eventLocation;
final String eventDescription;
final String eventImage;
final VoidCallback onTap;

const EventContainer({
Key? key,
required this.eventName,
required this.eventDate,
required this.eventLocation,
required this.eventDescription,
required this.eventImage,
required this.onTap,
}) : super(key: key);

@override
Widget build(BuildContext context) {
return GestureDetector(
onTap: () => Navigator.push(context,
MaterialPageRoute(builder: (context) => EventDetails(data: data))),
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Stack(
children: [
Container(
height: 200,
width: double.infinity,
margin: const EdgeInsets.all(8),
decoration: BoxDecoration(
color: const Color(0xFF2A2D3E),
borderRadius: BorderRadius.circular(8),
boxShadow: const [
BoxShadow(
color: Color.fromARGB(255, 218, 255, 123),
blurRadius: 0,
offset: Offset(5, 5),
),
],
),
child: ClipRRect(
borderRadius: BorderRadius.circular(8),
child: ColorFiltered(
colorFilter: ColorFilter.mode(
Colors.black.withOpacity(0.35),
BlendMode.darken,
),
return Card(
elevation: 4,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12),
),
child: InkWell(
onTap: onTap,
child: Padding(
padding: const EdgeInsets.all(16.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
if (eventImage.isNotEmpty)
ClipRRect(
borderRadius: BorderRadius.circular(8),
child: Image.network(
"https://cloud.appwrite.io/v1/storage/buckets/64bcdd3ad336eaa231f0/files/${data.data["image"]}/view?project=64b4fc61e5f4aa023618",
eventImage,
height: 200,
width: double.infinity,
fit: BoxFit.cover,
),
),
),
),
Positioned(
bottom: 70,
left: 16,
child: SizedBox(
width: MediaQuery.of(context).size.width * 0.9,
child: Text(
data.data["name"],
overflow: TextOverflow.ellipsis,
style: const TextStyle(
overflow: TextOverflow.ellipsis,
color: Colors.white,
fontSize: 24,
fontWeight: FontWeight.w900,
),
const SizedBox(height: 12),
Text(
eventName,
style: const TextStyle(
fontSize: 20,
fontWeight: FontWeight.bold,
),
),
),
Positioned(
bottom: 45,
left: 16,
child: Row(
const SizedBox(height: 8),
Row(
children: [
const Icon(Icons.calendar_month_outlined, size: 18),
const Icon(Icons.calendar_today, size: 16),
const SizedBox(width: 4),
Text(
formatDate(data.data["datetime"]),
style: const TextStyle(
color: Colors.white,
fontSize: 14,
fontWeight: FontWeight.w400,
),
formatDateTime(eventDate),
style: const TextStyle(color: Colors.grey),
),
const SizedBox(width: 14),
const Icon(Icons.access_time_rounded, size: 18),
],
),
const SizedBox(height: 4),
Row(
children: [
const Icon(Icons.location_on, size: 16),
const SizedBox(width: 4),
Text(
formatTime(data.data["datetime"]),
style: const TextStyle(
color: Colors.white,
fontSize: 14,
fontWeight: FontWeight.w400,
),
eventLocation,
style: const TextStyle(color: Colors.grey),
),
],
),
),
Positioned(
bottom: 20,
left: 16,
child: Row(
children: [
const Icon(Icons.location_on_outlined, size: 18),
const SizedBox(width: 4),
Text(
data.data["location"],
style: const TextStyle(
color: Colors.white,
fontSize: 14,
fontWeight: FontWeight.w400,
),
),
],
))
],
const SizedBox(height: 8),
Text(
eventDescription,
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: const TextStyle(fontSize: 14),
),
],
),
),
),
);
Expand Down
6 changes: 5 additions & 1 deletion lib/containers/format_datetime.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import 'package:intl/intl.dart';

formatTime(String time) {
DateTime dateTime = DateTime.parse(time);

String formattedTime = DateFormat('h:mm a').format(dateTime);
return formattedTime;
}
Expand All @@ -12,3 +11,8 @@ formatDate(String date) {
String formattedDate = DateFormat('d MMMM yyyy').format(dateTime);
return formattedDate;
}

String formatDateTime(DateTime dateTime) {
String formattedDate = DateFormat('d MMMM yyyy, h:mm a').format(dateTime);
return formattedDate;
}
Loading