SHARE
TWEET

Untitled

a guest Jan 20th, 2020 75 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import 'dart:math';
  2. import 'dart:typed_data';
  3. import 'package:flutter/material.dart';
  4. import 'package:flutter_signature_pad/flutter_signature_pad.dart';
  5.  
  6. import 'dart:ui' as ui;
  7.  
  8. import 'package:flutter/services.dart';
  9.  
  10. void main() => runApp(MyApp());
  11.  
  12. class MyApp extends StatelessWidget {
  13.   // This widget is the root of your application.
  14.   @override
  15.   Widget build(BuildContext context) {
  16.     return MaterialApp(
  17.       title: 'Flutter Demo',
  18.       theme: ThemeData(
  19.         primarySwatch: Colors.blue,
  20.       ),
  21.       home: MyHomePage(),
  22.     );
  23.   }
  24. }
  25.  
  26. class MyHomePage extends StatefulWidget {
  27.   ByteData _img = ByteData(0);
  28.  
  29.   @override
  30.   _MyHomePageState createState() => _MyHomePageState();
  31. }
  32.  
  33. class _MyHomePageState extends State<MyHomePage> {
  34.   var color = Colors.red;
  35.   var strokeWidth = 5.0;
  36.   final _sign = GlobalKey<SignatureState>();
  37.   ByteData _img = ByteData(0);
  38.  
  39.   @override
  40.   Widget build(BuildContext context) {
  41.     return Scaffold(
  42.       appBar: AppBar(
  43.         title: Text("Testing"),
  44.       ),
  45.       body: SingleChildScrollView(
  46.         child: Column(
  47.           children: <Widget>[
  48.             Container(
  49.               height: 100.0,
  50.               color: Colors.blue,
  51.               child: Signature(),
  52.             )
  53.           ],
  54.         ),
  55.       ),
  56.     );
  57.   }
  58. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top