native_image_view 0.0.2 copy "native_image_view: ^0.0.2" to clipboard
native_image_view: ^0.0.2 copied to clipboard

该组件提供了一种方式,可以让flutter通过methodChannel调用原生的本地和网络图片的加载

example/lib/main.dart

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

void main() {
  runApp(MyApp());
}

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  String url = "https://iknow-pic.cdn.bcebos.com/79f0f736afc379313a380ef3e7c4b74542a91193";
  //String url = "localImage://wdqy.jpeg";

  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: Text('example'),
        ),
        body: Center(
        child: NativeImageView(
          url: url,
          width: 300,
          height: 200,
        ),
      ),
    ));
  }
}
1
likes
25
pub points
0%
popularity

Publisher

unverified uploader

该组件提供了一种方式,可以让flutter通过methodChannel调用原生的本地和网络图片的加载

Repository (GitHub)
View/report issues

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on native_image_view