Skip to content

Instantly share code, notes, and snippets.

View DavBfr's full-sized avatar

David PHAM-VAN DavBfr

  • Halifax, Canada, NS
View GitHub Profile
import 'dart:async';
import 'package:flutter/material.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
@DavBfr
DavBfr / detect_image_size.dart
Last active May 4, 2022 10:56
ProxyImageProvider to lazily get the image dimensions
// Test at:
// https://dartpad.dev/?id=a461c845871455e6d785248ded5a7982
import 'dart:async';
import 'dart:math';
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
@DavBfr
DavBfr / main.dart
Last active May 2, 2022 21:03
Progres indicator
// Test at:
// https://dartpad.dev/?id=a07e7f4ceefff225c9ed0b9d276ec5a0
import 'dart:async';
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
@DavBfr
DavBfr / example-signature.dart
Created March 25, 2022 12:27
Pdf Digital signature
import 'dart:typed_data';
import 'package:flutter/material.dart';
import 'package:pdf/pdf.dart';
import 'package:pdf/widgets.dart' as pw;
import 'package:pdf_crypto/pdf_crypto.dart';
import 'package:printing/printing.dart';
Future<void> main() async {
runApp(const MyApp('Printing Demo'));
@DavBfr
DavBfr / seyes.dart
Last active March 25, 2022 12:59
French seyes page example
import 'dart:typed_data';
import 'package:flutter/material.dart';
import 'package:pdf/pdf.dart';
import 'package:pdf/widgets.dart' as pw;
import 'package:printing/printing.dart';
Future<void> main() async {
runApp(const MyApp('Printing Demo'));
}
import 'dart:typed_data';
import 'package:flutter/material.dart';
import 'package:pdf/pdf.dart';
import 'package:pdf/widgets.dart' as pw;
import 'package:printing/printing.dart';
Future<void> main() async {
runApp(const MyApp('Printing Demo'));
}
@DavBfr
DavBfr / pictures.dart
Last active March 25, 2022 13:27
PDF with pictures
import 'dart:typed_data';
import 'package:flutter/material.dart';
import 'package:pdf/pdf.dart';
import 'package:pdf/widgets.dart' as pw;
import 'package:printing/printing.dart';
void main() => runApp(const MyApp('Some pictures'));
class MyApp extends StatelessWidget {
@DavBfr
DavBfr / main.yaml
Last active September 30, 2024 04:05
esc_pos_printer with pdf/printing
import 'dart:typed_data';
import 'package:flutter/material.dart';
import 'package:flutter_esc_pos_network/flutter_esc_pos_network.dart';
import 'package:flutter_esc_pos_utils/flutter_esc_pos_utils.dart';
import 'package:image/image.dart' as im;
import 'package:pdf/pdf.dart';
import 'package:pdf/widgets.dart' as pdf;
import 'package:printing/printing.dart';