NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

import 'package:flutter/material.dart';
import 'package:where_is_my_books/models/Book.dart';
import 'package:where_is_my_books/models/BorrowedBook.dart';
import 'package:where_is_my_books/services/fileServices.dart';

class DetailPage extends StatefulWidget {
final BorrowedBook book;
DetailPage({Key key, @required this.book}) : super(key: key);
@override
State<StatefulWidget> createState() => DetailPageState();
}

class DetailPageState extends State<DetailPage> {
FileServices fileServices = FileServices();
Image defaultBookImage = FileServices().readDefaultImage();
String bookImageFileName;
var bookImage;
var borrowerImage;
@override
void initState() {
super.initState();
bookImageFileName = widget.book.picture;
if (bookImageFileName == "") {
bookImage = FileServices().readDefaultImage();
} else {
FileServices().readImageAsync(bookImageFileName).then((image) {
bookImage = image;
});
}
// FileServices().readImageAsync(widget.book.borrowerPicture).then((image) {
// borrowerImage = image;
// });
borrowerImage = FileServices().readImage(widget.book.borrowerPicture);
}

@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(widget.book.name),
),
body: Container(
margin: const EdgeInsets.symmetric(horizontal: 20.0),
child: new SingleChildScrollView(
child: Column(
children: <Widget>[
const Padding(padding: EdgeInsets.only(bottom: 16.0)),
BookDetailHeader(),
Text("dfrdf")
],
),
),
),
);
}

Widget BookDetailHeader() {
var textTheme = Theme.of(context).textTheme;

var bookInformation = Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(
widget.book.name,
style: textTheme.title,
)
],
);

return Stack(
children: <Widget>[
Padding(
padding: const EdgeInsets.only(bottom: 140.0),
child: ArcBannerImage(),
),
Positioned(
bottom: 0.0,
left: 16.0,
right: 16.0,
child: Row(
crossAxisAlignment: CrossAxisAlignment.end,
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
// Poster(book.picture,height:180.0),
SizedBox(
width: 16.0,
),
Expanded(
child: bookInformation,
)
],
),
)
],
);
}

Widget ArcBannerImage() {
return ClipPath(clipper: ArcClipper(), child: borrowerImage);
}
}

class ArcClipper extends CustomClipper<Path> {
@override
Path getClip(Size size) {
var path = Path();
path.lineTo(0.0, size.height - 30);

var firstControlPoint = Offset(size.width / 4, size.height);
var firstPoint = Offset(size.width / 2, size.height);
path.quadraticBezierTo(firstControlPoint.dx, firstControlPoint.dy,
firstPoint.dx, firstPoint.dy);

var secondControlPoint = Offset(size.width - (size.width / 4), size.height);
var secondPoint = Offset(size.width, size.height - 30);
path.quadraticBezierTo(secondControlPoint.dx, secondControlPoint.dy,
secondPoint.dx, secondPoint.dy);

path.lineTo(size.width, 0.0);
path.close();

return path;
}

@override
bool shouldReclip(CustomClipper<Path> oldClipper) => false;
}
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.