Skip to content

Commit

Permalink
add detail portofolio
Browse files Browse the repository at this point in the history
  • Loading branch information
DeepSyyy committed Jun 14, 2024
1 parent 4191c30 commit 057ed40
Show file tree
Hide file tree
Showing 24 changed files with 298 additions and 46 deletions.
2 changes: 2 additions & 0 deletions lib/core/const/constant.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// ignore_for_file: non_constant_identifier_names

String base_url = "http://fotoin.southeastasia.cloudapp.azure.com/api";
String register_path = "/register";
String login_path = "/login";
Expand Down
4 changes: 3 additions & 1 deletion lib/core/styles/colors.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// ignore_for_file: prefer_const_declarations

import 'package:flutter/material.dart';

abstract class AppColor {
Expand All @@ -20,7 +22,7 @@ abstract class AppColor {
static final green600 = _FotoInColor.green.shade600;
static final yellow = _FotoInColor.yellow;

static final border = Color(0xFFF5F5F5);
static final border = const Color(0xFFF5F5F5);
}

abstract class _FotoInColor {
Expand Down
2 changes: 2 additions & 0 deletions lib/core/token/SecureStorage.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// ignore_for_file: file_names, avoid_print

import 'package:flutter_secure_storage/flutter_secure_storage.dart';

class SecureStorage {
Expand Down
2 changes: 2 additions & 0 deletions lib/data/auth/datasource/remote/auth_remote_datasource.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// ignore_for_file: avoid_print

import 'package:foto_in/core/const/constant.dart';
import 'package:foto_in/core/errors/exceptions.dart';
import 'package:foto_in/data/auth/model/LoginRequest.dart';
Expand Down
2 changes: 2 additions & 0 deletions lib/data/auth/model/LoginDataModel.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// ignore_for_file: file_names

import 'package:foto_in/data/auth/model/UserModel.dart';

class LoginDataModel {
Expand Down
3 changes: 3 additions & 0 deletions lib/data/auth/model/LoginRequest.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// ignore: file_names
// ignore_for_file: file_names, duplicate_ignore

class LoginRequest {
String username;
String password;
Expand Down
2 changes: 2 additions & 0 deletions lib/data/auth/model/LoginResponse.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// ignore_for_file: file_names

import 'package:foto_in/data/auth/model/LoginDataModel.dart';

class LoginResponse {
Expand Down
2 changes: 2 additions & 0 deletions lib/data/auth/model/RegisterDataModel.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// ignore_for_file: file_names

class RegisterDataModel {
final String username;
final String fullname;
Expand Down
2 changes: 2 additions & 0 deletions lib/data/auth/model/RegisterRequest.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// ignore_for_file: file_names

class RegisterRequest {
String username;
String fullname;
Expand Down
2 changes: 2 additions & 0 deletions lib/data/auth/model/RegisterResponse.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// ignore_for_file: file_names

import 'package:foto_in/data/auth/model/RegisterDataModel.dart';

class RegisterResponse {
Expand Down
2 changes: 2 additions & 0 deletions lib/data/auth/model/UserModel.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// ignore_for_file: file_names

class UserModel {
final String id;
final String username;
Expand Down
2 changes: 2 additions & 0 deletions lib/data/booking/datasource/remote/booking_data_source.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// ignore_for_file: avoid_print

import 'package:dio/dio.dart';
import 'package:foto_in/core/const/constant.dart';
import 'package:foto_in/core/errors/exceptions.dart';
Expand Down
2 changes: 2 additions & 0 deletions lib/data/booking/model/AcceptBookingRequest.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// ignore_for_file: file_names

class AcceptBookingRequest {
final bool confirmation;

Expand Down
2 changes: 2 additions & 0 deletions lib/data/booking/model/BookingModel.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// ignore_for_file: file_names

import 'package:foto_in/utils/enums/order_status_enum.dart';
import 'package:foto_in/utils/extensions/extensions.dart';

Expand Down
2 changes: 2 additions & 0 deletions lib/data/booking/model/BookingRequest.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// ignore_for_file: file_names

class BookingRequest {
final String photographerId;
final String acara;
Expand Down
2 changes: 2 additions & 0 deletions lib/data/booking/model/BookingResponse.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// ignore_for_file: file_names

import 'package:foto_in/data/booking/model/BookingModel.dart';

class BookingResponse {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:foto_in/core/styles/colors.dart';
import 'package:foto_in/core/styles/typography.dart';
Expand All @@ -22,6 +21,7 @@ class _BookingWidgetMobileState extends State<BookingWidgetMobile> {

final GlobalKey<FormState> _formKey = GlobalKey<FormState>();

@override
void initState() {
super.initState();
_selectedController.text = _selectedDate;
Expand Down Expand Up @@ -74,29 +74,30 @@ class _BookingWidgetMobileState extends State<BookingWidgetMobile> {
final TextEditingController _selectedController = TextEditingController();
final TextEditingController _tfEditingJenisAcara = TextEditingController();
final TextEditingController _tfEditingLokasiAcara = TextEditingController();
final TextEditingController _tfEditingTanggalAcara = TextEditingController();
final TextEditingController _tfEditingDurasi = TextEditingController();
final TextEditingController _tfEditingWaktuMulai = TextEditingController();
final TextEditingController _tfEditingKonsep = TextEditingController();
@override
Widget build(BuildContext context) {
return Scaffold(
resizeToAvoidBottomInset: false,
backgroundColor: AppColor.backgroundPrimary,
appBar: AppBar(
backgroundColor: AppColor.backgroundPrimary,
titleTextStyle: FotoInHeadingTypography.small(
color: AppColor.textPrimary,
),
centerTitle: true,
title: Text('Booking'),
title: const Text('Booking'),
),
body: SafeArea(
child: Column(
children: [
Expanded(
child: Form(
key: _formKey,
child: ListView(
padding: EdgeInsets.symmetric(horizontal: 16),
padding: const EdgeInsets.symmetric(horizontal: 16),
children: [
Text(
"Jenis Acara",
Expand Down Expand Up @@ -270,7 +271,7 @@ class _BookingWidgetMobileState extends State<BookingWidgetMobile> {
color: AppColor
.textPrimary),
),
dayFormat: 'EEE',
dayFormat: 'E',
weekNumberStyle:
DateRangePickerWeekNumberStyle(
textStyle: FotoInSubHeadingTypography
Expand Down Expand Up @@ -337,6 +338,79 @@ class _BookingWidgetMobileState extends State<BookingWidgetMobile> {
const SizedBox(
height: 16,
),
Row(
children: [
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Durasi(Jam)",
style: FotoInSubHeadingTypography.small(
color: AppColor.textPrimary),
),
const SizedBox(
height: 8,
),
TfFotoin(
controller: _tfEditingDurasi,
hintText: "Durasi(Jam)",
keyboardType: TextInputType.name,
maxLines: 1,
validator: "Durasi"),
],
),
),
const SizedBox(
width: 20,
),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Waktu Mulai",
style: FotoInSubHeadingTypography.small(
color: AppColor.textPrimary),
),
const SizedBox(
height: 8,
),
Row(
children: [
Expanded(
child: TfFotoin(
controller: _tfEditingWaktuMulai,
hintText: "08:00",
keyboardType: TextInputType.name,
maxLines: 1,
readOnly: true,
validator: "Waktu Mulai"),
),
const SizedBox(
width: 4,
),
InkWell(
onTap: () {
showTimePicker(
context: context,
initialTime: TimeOfDay.now(),
).then((TimeOfDay? value) {
if (value != null) {
_tfEditingWaktuMulai.text =
value.format(context);
}
});
},
child: const Icon(Iconsax.clock_1,
color: AppColor.textPrimary))
],
)
],
),
),
],
),
Text(
"Lokasi Acara",
style: FotoInSubHeadingTypography.small(
Expand All @@ -355,10 +429,33 @@ class _BookingWidgetMobileState extends State<BookingWidgetMobile> {
maxLines: 1,
validator: "Tempat Acara",
keyboardType: TextInputType.name),
const SizedBox(
height: 16,
),
Text(
"Catatan Tambahan",
style: FotoInSubHeadingTypography.small(
color: AppColor.textPrimary),
),
const SizedBox(
height: 8,
),
TfFotoin(
controller: _tfEditingKonsep,
hintText: "Konsep",
maxLines: 5,
validator: "Konsep",
keyboardType: TextInputType.name),
],
),
)),
BookingBottomBar()
BookingBottomBar(
onPressed: () {
if (_formKey.currentState!.validate()) {
Navigator.pop(context);
}
},
)
],
),
),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
import 'package:flutter/material.dart';
import 'package:foto_in/core/styles/colors.dart';
import 'package:foto_in/core/styles/typography.dart';
import 'package:foto_in/feature/booking/presentation/view/booking_view.dart';
import 'package:foto_in/utils/button.dart';

class BookingBottomBar extends StatelessWidget {
const BookingBottomBar({
super.key,
required this.onPressed,
});

final Function() onPressed;

@override
Widget build(BuildContext context) {
return Container(
padding: EdgeInsets.all(16),
decoration: BoxDecoration(
padding: const EdgeInsets.all(16),
decoration: const BoxDecoration(
color: AppColor.backgroundPrimary,
// border top
border: Border(
Expand All @@ -34,7 +36,7 @@ class BookingBottomBar extends StatelessWidget {
style: FotoInSubHeadingTypography.small(
color: AppColor.textTeriary),
),
SizedBox(
const SizedBox(
height: 4,
),
Text(
Expand All @@ -46,10 +48,8 @@ class BookingBottomBar extends StatelessWidget {
),
FotoInButton(
text: "Booking",
onPressed: () {
Navigator.pushNamed(context, BookingView.routeName);
},
padding: EdgeInsets.symmetric(horizontal: 56, vertical: 16),
onPressed: onPressed,
padding: const EdgeInsets.symmetric(horizontal: 56, vertical: 16),
),
],
),
Expand Down
Loading

0 comments on commit 057ed40

Please sign in to comment.