fl_drag_picture 1.0.1 fl_drag_picture: ^1.0.1 copied to clipboard
用Flutter实现的多图片拖动,上传至网络, 开箱即用.
import 'package:fl_drag_picture/drag_picture_logic.dart';
import 'package:flutter/material.dart';
import 'package:fl_drag_picture/fl_drag_picture.dart';
import 'package:get/get.dart';
import 'package:get/get_core/src/get_main.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatefulWidget {
const MyApp({super.key});
@override
State<MyApp> createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
@override
void initState() {
super.initState();
}
List<String> tempUrl = [
"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcS2zFG-Cy6Jg2GBcZrK-se70-cUMGL2lkqNqYCWhrCW&s",
"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRD7uzo6K_z3e5vsNk-J7W-OoSSfNCVCMCN5yH4c1KA&s",
"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTDLG1rePq00VAg7LohNQTGpl3cQkZLUz6NWyHwUJ12&s",
"https://static.wikia.nocookie.net/starwars/images/1/1c/CT5385Tup-TCWCEJtB.png/revision/latest?cb=20221005011539",
"https://5.imimg.com/data5/ANDROID/Default/2020/8/RU/EX/EI/112326264/product-jpeg-500x500.jpg",
"https://www.tupcavite.edu.ph/images/TUPSeal2.png"
];
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text('Plugin example app'),
),
body: Center(
child:
FlDragPicture(maxSelect: 5, picList: tempUrl, isShowBigPic: true),
),
),
);
}
void xxx(){
Get.find<DragPictureController>();
}
}