Toggle navigation
Toggle navigation
This project
Loading...
Sign in
flutter_package
/
dart_pdf
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
David PHAM-VAN
2021-02-09 08:26:27 -0400
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
ebf5616dc9424c98d035da6ccde8ebbda034399c
ebf5616d
1 parent
e76cf661
Fix PdfPreview default locale
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
3 deletions
printing/CHANGELOG.md
printing/lib/src/pdf_preview.dart
printing/pubspec.yaml
printing/CHANGELOG.md
View file @
ebf5616
# Changelog
## 5.0.0-nullsafety.1
-
Fix PdfPreview default locale
## 5.0.0-nullsafety.0
-
Remove useless files
...
...
printing/lib/src/pdf_preview.dart
View file @
ebf5616
...
...
@@ -169,8 +169,8 @@ class _PdfPreviewState extends State<PdfPreview> {
void
initState
()
{
if
(
widget
.
initialPageFormat
==
null
)
{
final
locale
=
WidgetsBinding
.
instance
!.
window
.
locale
;
// ignore: invalid_null_aware_operator
final
cc
=
locale
?.
countryCode
??
'US'
;
// ignore: unnecessary_cast, avoid_as
final
cc
=
(
locale
as
Locale
?)?.
countryCode
??
'US'
;
if
(
cc
==
'US'
||
cc
==
'CA'
||
cc
==
'MX'
)
{
pageFormat
=
PdfPageFormat
.
letter
;
...
...
printing/pubspec.yaml
View file @
ebf5616
...
...
@@ -4,7 +4,7 @@ description: Plugin that allows Flutter apps to generate and print documents to
homepage
:
https://github.com/DavBfr/dart_pdf/tree/master/printing
repository
:
https://github.com/DavBfr/dart_pdf
issue_tracker
:
https://github.com/DavBfr/dart_pdf/issues
version
:
5.0.0-nullsafety.
0
version
:
5.0.0-nullsafety.
1
environment
:
sdk
:
"
>=2.12.0-0
<3.0.0"
...
...
Please
register
or
login
to post a comment