skip to Main Content

I tried Flutter to take pictures from cloudinary, and I used the resize app for Flutter to avoid the large size of the app, using flutter build apk --split-per-abi but when the app is installed the app doesn’t take pictures like it does when I did the test directly with without debugging

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()),
                  ),
                ],
              ),
            );
          },
        )),
      ),
    );
  }
}

2

Answers


  1. Using this package, you can identify errors
    https://pub.dev/packages/cached_network_image

    Row(
         children: [
          Container(
          child:
          CachedNetworkImage(
          imageUrl: "https://res.cloudinary.com/tmart/image/upload/v1673656769/xnmqxoeruaq2yddwevpk.jpg",
            progressIndicatorBuilder: (context, url, downloadProgress) =>
                CircularProgressIndicator(value: downloadProgress.progress),
            errorWidget: (context, url, error) => Icon(Icons.error),
          ),
    
          Container(
            child: Text(faker.person.name()),
          ),
          ],
        ),
    
    Login or Signup to reply.
  2. Please check if your app has internet permissions
    in AndroidMenifest.xml

    <uses-permission android:name="android.permission.INTERNET" />
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search