David PHAM-VAN

Apply dart 2.4.0 formatting

... ... @@ -2,4 +2,4 @@ import 'package:archive/archive.dart';
import 'package:pdf/pdf.dart';
DeflateCallback defaultDeflate = ZLibEncoder().encode;
DeflateCallback defaultDeflate = ZLibEncoder().encode;
... ...
... ... @@ -31,41 +31,41 @@ void main() {
test('Clip Widgets ClipRect', () {
pdf.addPage(Page(
build: (Context context) => ClipRect(
child: Transform.rotate(
angle: 0.1,
child: Container(
decoration: const BoxDecoration(
color: PdfColors.blue,
),
),
child: Transform.rotate(
angle: 0.1,
child: Container(
decoration: const BoxDecoration(
color: PdfColors.blue,
),
),
),
),
));
});
test('Clip Widgets ClipRRect', () {
pdf.addPage(Page(
build: (Context context) => ClipRRect(
horizontalRadius: 30,
verticalRadius: 30,
child: Container(
decoration: const BoxDecoration(
color: PdfColors.blue,
),
),
horizontalRadius: 30,
verticalRadius: 30,
child: Container(
decoration: const BoxDecoration(
color: PdfColors.blue,
),
),
),
));
});
test('Clip Widgets ClipOval', () {
pdf.addPage(Page(
build: (Context context) => ClipOval(
child: Container(
decoration: const BoxDecoration(
color: PdfColors.blue,
),
),
child: Container(
decoration: const BoxDecoration(
color: PdfColors.blue,
),
),
),
));
});
... ...
... ... @@ -49,24 +49,24 @@ void main() {
test('Container Widgets Flat', () {
pdf.addPage(Page(
build: (Context context) => Container(
alignment: Alignment.center,
margin: const EdgeInsets.all(30),
padding: const EdgeInsets.all(20),
decoration: const BoxDecoration(
color: PdfColors.blue,
borderRadius: 20,
border: BoxBorder(
color: PdfColors.blue800,
top: true,
left: true,
right: true,
bottom: true,
width: 2,
)),
width: 200,
height: 400,
// child: Placeholder(),
),
alignment: Alignment.center,
margin: const EdgeInsets.all(30),
padding: const EdgeInsets.all(20),
decoration: const BoxDecoration(
color: PdfColors.blue,
borderRadius: 20,
border: BoxBorder(
color: PdfColors.blue800,
top: true,
left: true,
right: true,
bottom: true,
width: 2,
)),
width: 200,
height: 400,
// child: Placeholder(),
),
));
});
... ... @@ -77,16 +77,16 @@ void main() {
pdf.addPage(Page(
build: (Context context) => Container(
alignment: Alignment.center,
margin: const EdgeInsets.all(30),
padding: const EdgeInsets.all(20),
decoration: BoxDecoration(
image: DecorationImage(image: image, fit: BoxFit.cover),
),
width: 200,
height: 400,
// child: Placeholder(),
),
alignment: Alignment.center,
margin: const EdgeInsets.all(30),
padding: const EdgeInsets.all(20),
decoration: BoxDecoration(
image: DecorationImage(image: image, fit: BoxFit.cover),
),
width: 200,
height: 400,
// child: Placeholder(),
),
));
});
... ...
... ... @@ -74,10 +74,10 @@ void main() {
test('Table Widget filled', () {
pdf.addPage(Page(
build: (Context context) => Table(
children: buildTable(context: context, count: 20),
border: const TableBorder(),
tableWidth: TableWidth.max,
),
children: buildTable(context: context, count: 20),
border: const TableBorder(),
tableWidth: TableWidth.max,
),
));
});
... ...
... ... @@ -60,13 +60,13 @@ void main() {
pdf.addPage(Page(
build: (Context context) => ListView(
children: <Widget>[
Text(
style.font.fontName,
style: style,
),
],
children: <Widget>[
Text(
style.font.fontName,
style: style,
),
],
),
));
});
... ...
... ... @@ -124,79 +124,71 @@ Future<Document> generateDocument(PdfPageFormat format) async {
right: 2.0 * PdfPageFormat.cm,
bottom: 2.0 * PdfPageFormat.cm),
build: (Context context) => Row(children: <Widget>[
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
padding: const EdgeInsets.only(left: 30, bottom: 20),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text('Parnella Charlesbois',
textScaleFactor: 2,
style: Theme.of(context)
.defaultTextStyle
.copyWith(fontWeight: FontWeight.bold)),
Padding(padding: const EdgeInsets.only(top: 10)),
Text('Electrotyper',
textScaleFactor: 1.2,
style: Theme.of(context)
.defaultTextStyle
.copyWith(
fontWeight: FontWeight.bold,
color: green)),
Padding(padding: const EdgeInsets.only(top: 20)),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
Text('568 Port Washington Road'),
Text('Nordegg, AB T0M 2H0'),
Text('Canada, ON'),
]),
Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
Text('+1 403-721-6898'),
Text('p.charlesbois@yahoo.com'),
Text('wholeprices.ca')
]),
Padding(padding: EdgeInsets.zero)
]),
])),
Category(title: 'Work Experience'),
Block(title: 'Tour bus driver'),
Block(title: 'Logging equipment operator'),
Block(title: 'Foot doctor'),
Category(title: 'Education'),
Block(title: 'Bachelor Of Commerce'),
Block(title: 'Bachelor Interior Design'),
])),
Container(
height: double.infinity,
width: 10,
decoration: const BoxDecoration(
border: BoxBorder(left: true, color: green, width: 2)),
),
Column(
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
ClipOval(
child: Container(
width: 100,
height: 100,
color: lightGreen,
child: profileImage == null
? Container()
: Image(profileImage)))
])
]),
Container(
padding: const EdgeInsets.only(left: 30, bottom: 20),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text('Parnella Charlesbois',
textScaleFactor: 2,
style: Theme.of(context)
.defaultTextStyle
.copyWith(fontWeight: FontWeight.bold)),
Padding(padding: const EdgeInsets.only(top: 10)),
Text('Electrotyper',
textScaleFactor: 1.2,
style: Theme.of(context).defaultTextStyle.copyWith(
fontWeight: FontWeight.bold, color: green)),
Padding(padding: const EdgeInsets.only(top: 20)),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text('568 Port Washington Road'),
Text('Nordegg, AB T0M 2H0'),
Text('Canada, ON'),
]),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text('+1 403-721-6898'),
Text('p.charlesbois@yahoo.com'),
Text('wholeprices.ca')
]),
Padding(padding: EdgeInsets.zero)
]),
])),
Category(title: 'Work Experience'),
Block(title: 'Tour bus driver'),
Block(title: 'Logging equipment operator'),
Block(title: 'Foot doctor'),
Category(title: 'Education'),
Block(title: 'Bachelor Of Commerce'),
Block(title: 'Bachelor Interior Design'),
])),
Container(
height: double.infinity,
width: 10,
decoration: const BoxDecoration(
border: BoxBorder(left: true, color: green, width: 2)),
),
Column(crossAxisAlignment: CrossAxisAlignment.start, children: <Widget>[
ClipOval(
child: Container(
width: 100,
height: 100,
color: lightGreen,
child:
profileImage == null ? Container() : Image(profileImage)))
])
]),
));
return pdf;
}
... ...