Skip to content

Latest commit

 

History

History
41 lines (32 loc) · 605 Bytes

README.md

File metadata and controls

41 lines (32 loc) · 605 Bytes

widgeto

A simple way to transform your widget into other formats

Add to pubspec.yaml

dependencies:
  widgeto: 0.0.1

Example

import 'package:widgeto/widgeto.dart';
import 'package:flutter/material.dart';

void main() async {
    Widgeto widgeto = new Widgeto();
    await widgeto.pdf(Container(
        height: 100,
        width: 200,
        color: Colors.red,
    );
}

For StatelessWidget

...
  widgeto.pdf(MyStatelessWidget().build(null));
...

For StatefullWidget

...
  widgeto.pdf(MyStatefulWidget().createState().build(null));
...