David PHAM-VAN

Add TravisCi configuration file

  1 +language: dart
  2 +dist: bionic
  3 +addons:
  4 + apt:
  5 + packages:
  6 + - lib32stdc++6
  7 +install:
  8 + - git clone https://github.com/flutter/flutter.git -b stable --depth 1 $HOME/flutter
  9 + - export PATH=$HOME/flutter/bin:$PATH
  10 + - flutter doctor
  11 + - flutter --version
  12 +script:
  13 + - make analyze-ci-pdf
  14 + - make analyze-ci-printing
  15 + - make test
  16 + - make test-readme
@@ -117,6 +117,16 @@ analyze-printing: .pana @@ -117,6 +117,16 @@ analyze-printing: .pana
117 117
118 analyze: analyze-pdf analyze-printing 118 analyze: analyze-pdf analyze-printing
119 119
  120 +analyze-ci-pdf: .pana
  121 + @find pdf -name pubspec.yaml -exec sed -i -e 's/^dependency_overrides:/_dependency_overrides:/g' '{}' ';'
  122 + @pub global run pana --no-warning --source path pdf
  123 + @find pdf -name pubspec.yaml -exec sed -i -e 's/^_dependency_overrides:/dependency_overrides:/g' '{}' ';'
  124 +
  125 +analyze-ci-printing: .pana
  126 + @find printing -name pubspec.yaml -exec sed -i -e 's/^dependency_overrides:/_dependency_overrides:/g' '{}' ';'
  127 + @pub global run pana --no-warning --source path printing
  128 + @find printing -name pubspec.yaml -exec sed -i -e 's/^_dependency_overrides:/dependency_overrides:/g' '{}' ';'
  129 +
120 .dartfix: 130 .dartfix:
121 pub global activate dartfix 131 pub global activate dartfix
122 touch $@ 132 touch $@
1 # Pdf for Dart and Flutter 1 # Pdf for Dart and Flutter
2 2
3 -This set of plugin allows Flutter apps to generate and print pdf files to device printer.  
4 -This plugin works for iOS and Android. 3 +[![Build Status](https://travis-ci.org/DavBfr/dart_pdf.svg?branch=master)](https://travis-ci.org/DavBfr/dart_pdf)
5 4
6 -* dart pdf: <https://pub.dartlang.org/packages/pdf>  
7 -* flutter printing: <https://pub.dartlang.org/packages/printing> 5 +This set of plugin allows Flutter apps to generate and print pdf files to device printer. This plugin works for iOS and Android.
  6 +
  7 +- dart pdf: <https://pub.dartlang.org/packages/pdf>
  8 +- flutter printing: <https://pub.dartlang.org/packages/printing>
8 9
9 [![Buy Me A Coffee](https://bmc-cdn.nyc3.digitaloceanspaces.com/BMC-button-images/custom_images/orange_img.png "Buy Me A Coffee")](https://www.buymeacoffee.com/JORBmbw9h "Buy Me A Coffee") 10 [![Buy Me A Coffee](https://bmc-cdn.nyc3.digitaloceanspaces.com/BMC-button-images/custom_images/orange_img.png "Buy Me A Coffee")](https://www.buymeacoffee.com/JORBmbw9h "Buy Me A Coffee")
@@ -19,6 +19,10 @@ import 'dart:io'; @@ -19,6 +19,10 @@ import 'dart:io';
19 import 'package:markdown/markdown.dart' as md; 19 import 'package:markdown/markdown.dart' as md;
20 20
21 Iterable<String> getCode(List<md.Node> nodes, [bool isCode = false]) sync* { 21 Iterable<String> getCode(List<md.Node> nodes, [bool isCode = false]) sync* {
  22 + if (nodes == null) {
  23 + return;
  24 + }
  25 +
22 for (md.Node node in nodes) { 26 for (md.Node node in nodes) {
23 if (node is md.Element) { 27 if (node is md.Element) {
24 // print(node.tag); 28 // print(node.tag);