Other articles


  1. [Flutter] Widget to image

    final GlobalKey genKey = GlobalKey();
    
    RepaintBoundary(
        key: genKey,
        child: ListTile(
            leading: CircleAvatar(),
            title: Text("www.ayavn.us"),
        ),
    ),
    
    
    ### Save image
    
    import 'package:path_provider/path_provider.dart';
    
    Future<void> takePicture() async {
      RenderRepaintBoundary boundary = genKey.currentContext.findRenderObject();
      ui.Image image = await boundary.toImage();
      final directory = (await getApplicationDocumentsDirectory()).path;
      ByteData byteData = await image.toByteData(format: ui …
    read more

    There are comments.

Links

Social