我尝试过Flutter从cloudinary中拍照,我使用Flutter的调整大小应用程序来避免应用程序的大尺寸,使用flutter build apk --split-per-abi,但安装应用程序后,应用程序无法像我在未调试的情况下直接进行测试时那样拍照
import 'package:faker/faker.dart';
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
var faker = new Faker();
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: Text('Test Scroll'),
),
body: Scrollbar(
child: ListView.builder(
padding: EdgeInsets.all(15),
itemCount: 1000,
itemBuilder: (context, index) {
return Container(
height: 200,
padding: EdgeInsets.symmetric(vertical: 10),
child: Row(
children: [
Container(
child: Image.network(
'https://res.cloudinary.com/tmart/image/upload/v1673656769/xnmqxoeruaq2yddwevpk.jpg'),
),
Container(
child: Text(faker.person.name()),
),
],
),
);
},
)),
),
);
}
}
1条答案
按热度按时间ztigrdn81#
使用此软件包,您可以识别错误https://pub.dev/packages/cached_network_image