Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
L
library-app-flutter
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ilham Maulana
library-app-flutter
Commits
e1a10987
Commit
e1a10987
authored
Jul 30, 2024
by
Ilham Maulana
💻
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: layout loan item
parent
ce45237a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
64 additions
and
123 deletions
+64
-123
loan_item.dart
lib/src/widgets/loans/loan_item.dart
+64
-123
No files found.
lib/src/widgets/loans/loan_item.dart
View file @
e1a10987
...
@@ -16,141 +16,82 @@ class LoanItem extends StatelessWidget {
...
@@ -16,141 +16,82 @@ class LoanItem extends StatelessWidget {
final
remainingDays
=
_loan
.
remainingDays
;
final
remainingDays
=
_loan
.
remainingDays
;
final
bookTitle
=
_loan
.
book
.
title
;
final
bookTitle
=
_loan
.
book
.
title
;
const
message
=
"Are you sure want to Return this book?"
;
return
Container
(
return
Container
(
margin:
const
EdgeInsets
.
symmetric
(
vertical:
10.0
,
horizontal:
20.0
),
margin:
const
EdgeInsets
.
symmetric
(
vertical:
10.0
,
horizontal:
20.0
),
child:
Card
(
child:
Card
(
child:
Padding
(
child:
Padding
(
padding:
const
EdgeInsets
.
symmetric
(
vertical:
10.0
,
horizontal:
20.0
),
padding:
const
EdgeInsets
.
symmetric
(
vertical:
10.0
,
horizontal:
20.0
),
child:
Column
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
children:
[
Padding
(
Padding
(
padding:
const
EdgeInsets
.
only
(
bottom:
10.0
),
padding:
const
EdgeInsets
.
only
(
bottom:
10.0
),
child:
Badge
(
child:
Badge
(
label:
Text
(
label:
Text
(
remainingDays
,
remainingDays
,
),
),
),
),
),
),
Padding
(
Padding
(
padding:
const
EdgeInsets
.
symmetric
(
vertical:
8.0
),
padding:
const
EdgeInsets
.
only
(
top:
8.0
),
child:
Row
(
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
children:
[
const
Expanded
(
const
Expanded
(
child:
Text
(
child:
Text
(
"Book Title"
,
"Book Title"
,
)
,
),
),
),
Expanded
(
Expanded
(
child:
Text
(
child:
Text
(
bookTitle
,
bookTitle
,
textAlign:
TextAlign
.
right
,
textAlign:
TextAlign
.
right
,
style:
const
TextStyle
(
fontWeight:
FontWeight
.
bold
)
,
style:
const
TextStyle
(
fontWeight:
FontWeight
.
bold
),
),
)
,
)
)
],
]
,
)
,
),
),
),
Padding
(
Padding
(
padding:
const
EdgeInsets
.
only
(
top:
8.0
),
padding:
const
EdgeInsets
.
only
(
top:
8.0
),
child:
Row
(
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
children:
[
const
Expanded
(
const
Expanded
(
child:
Text
(
"Loan Date"
),
child:
Text
(
"Loan Date"
),
),
Expanded
(
child:
Text
(
loanDate
,
textAlign:
TextAlign
.
right
,
style:
const
TextStyle
(
fontWeight:
FontWeight
.
bold
),
),
),
)
Expanded
(
],
child:
Text
(
loanDate
,
textAlign:
TextAlign
.
right
,
style:
Theme
.
of
(
context
).
textTheme
.
labelMedium
,
),
)
],
),
),
),
),
Padding
(
Padding
(
padding:
const
EdgeInsets
.
only
(
top:
4.0
),
padding:
const
EdgeInsets
.
only
(
top:
8.0
),
child:
Row
(
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
children:
[
const
Expanded
(
const
Expanded
(
child:
Text
(
"Due Date"
),
child:
Text
(
"Due Date"
),
),
Expanded
(
child:
Text
(
dueDate
,
textAlign:
TextAlign
.
right
,
style:
const
TextStyle
(
fontWeight:
FontWeight
.
bold
),
),
),
)
Expanded
(
],
child:
Text
(
),
dueDate
,
),
textAlign:
TextAlign
.
right
,
Container
(
style:
Theme
.
of
(
context
).
textTheme
.
labelMedium
,
width:
double
.
infinity
,
),
padding:
const
EdgeInsets
.
only
(
top:
20.0
),
)
child:
FilledButton
(
],
child:
const
Text
(
"Return"
),
),
onPressed:
()
{
showModalBottomSheet
<
void
>(
context:
context
,
builder:
(
BuildContext
context
)
{
return
SizedBox
(
height:
200
,
child:
Center
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
mainAxisSize:
MainAxisSize
.
min
,
children:
<
Widget
>[
Padding
(
padding:
const
EdgeInsets
.
symmetric
(
vertical:
10.0
),
child:
Text
(
bookTitle
,
style:
const
TextStyle
(
fontSize:
18.0
,
fontWeight:
FontWeight
.
w600
),
),
),
const
Padding
(
padding:
EdgeInsets
.
symmetric
(
vertical:
10.0
),
child:
Text
(
message
),
),
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
mainAxisSize:
MainAxisSize
.
min
,
children:
<
Widget
>[
OutlinedButton
(
child:
const
Text
(
'Cancel'
),
onPressed:
()
=>
Navigator
.
pop
(
context
),
),
const
SizedBox
(
width:
20.0
,
),
FilledButton
(
child:
const
Text
(
'Continue'
),
onPressed:
()
=>
Navigator
.
pop
(
context
),
),
],
),
],
),
),
);
},
);
},
),
),
)
,
]
,
]
,
)
,
),
),
)
)
,
),
);
);
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment