Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Randal L. Schwartz
@RandalSchwartz
but also why the .map.toList doesn’t have the right type.
Are you using NNBD yet?
I know you are running dart 2.13, but have you migrated and changed your pubspec.yaml to 2.12
Seya Obey
@seyaobey

I know you are running dart 2.13, but have you migrated and changed your pubspec.yaml to 2.12

yes II'm on 2.12

Randal L. Schwartz
@RandalSchwartz
there should not be “dynamic” there. I don’t understand this
Seya Obey
@seyaobey

Still curious why you’re doing a query, but getting a list of one item.

I'm using Hasura as my backend. And it returns a list of objects

Randal L. Schwartz
@RandalSchwartz
as the type for list.
Randal L. Schwartz
@RandalSchwartz
Ahh… this class isn’t nullsafe:
class Response {
  final String id;
I don’t thing DDCG works for null-safe yet.
But this works in dartpad:
void main() {
  var someList = [1, 2, 3].map((e) => Response(id: "$e")).toList();
  print(someList);
}

class Response {
  final String id;

  Response({required this.id});

  String toString() => "Response(id: $id)";
}
Odd, because that’s close to what you have.
Anyway, I have other things that must be done today. Sorry I coldn’t help further.
Seya Obey
@seyaobey
@RandalSchwartz thanks for the assistance!
Randal L. Schwartz
@RandalSchwartz
If you figure it out, please tag me.
1 reply
Johannes Milke
@JohannesMilke_twitter
Hello! I have created another video about "Flutter Tutorial - Persistent Bottom Sheet" https://www.youtube.com/watch?v=o01hE56RMrc alt
Bilawal Asghar
@tech35
Hey There, I am having issues with Flutter. Whenever I run the command "flutter pub get" or any other command in the terminal it returns this message "'where' is not recognized as an internal or external command,
operable program or batch file.
Error: Unable to find git in your PATH.
exit code 1
Please Help
If you figure it out, please tag me.
Randal L. Schwartz
@RandalSchwartz
@tech35 what platform? And did you follow all the install instructions step by step from flutter.dev?
raminmoharrami
@raminmoharrami
hi
@tech35 make sure u have installed git on ure system
make sure u have had add flutter directory to ure path so u can type flutter in cmd
Bilawal Asghar
@tech35
@RandalSchwartz I am on Windows I am using VS Code
@raminmoharrami I have git installed on my system and in my path
raminmoharrami
@raminmoharrami
@tech35 open cmd and type: flutter
ull be fine if its set in path
else u need to set it
image.png
rfwef wefwe
@wewewesdfwefwefwkefjdiowefm_gitlab
image.jpeg
Bilawal Asghar
@tech35
@raminmoharrami Thank you
hassan baiga
@hassan_baiga_twitter
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /Users/*/.pub-cache/hosted/pub.dartlang.org/file_picker-2.1.7/
any ideas guys ?
hassan baiga
@hassan_baiga_twitter
Because podeison_drive depends on flutter_localizations any from sdk which depends on intl 0.17.0, intl 0.17.0 is required.
So, because podeison_drive depends on intl ^0.16.1, version solving failed.
Sebastian Cheung CQF
@scheung38
What is the difference between audio record vs speech_to_text packages ?
rfwef wefwe
@wewewesdfwefwefwkefjdiowefm_gitlab
Hello guys Ihave a probleme maybe anyone can help.How can i get only the docs(which are uid) where my uid is not equal and add them into the list instead of including mine ? getusers() async {
var firestore = FirebaseFirestore.instance; QuerySnapshot qn = await firestore.collection('meinprofilsettings').get(); if (!mounted) return; setState(() { _allResults = qn.docs; });
Hello guys Ihave a probleme maybe anyone can help.How can i get only the docs(which are uid) where my uid is not equal and add them into the list instead of including mine ?
var firestore = FirebaseFirestore.instance; QuerySnapshot qn = await firestore.collection('meinprofilsettings').get(); if (!mounted) return; setState(() { _allResults = qn.docs; });
_allResults is a list
Corneluis J Heunis
@CorneluisTech789
Screenshot (2).png
Hi there is there someone that can help me out I'm coding a ecommerce app and i dont seem to get this right if u look at the image i send what I would like to achive is first I want to display the image ,next I would like to show to price in the center and underneath the price I would like to display the item decription but my problem Im having is that the discrition is long and I would like that it go to the next line hope u guys understand what im trying to achive here
Corneluis J Heunis
@CorneluisTech789
Untitled.png
if u look at item name It must go in about 2 to 3 lines and also be in the center
here is my code
import 'package:compu_tech_store/tools/store.dart';
import 'package:uuid/uuid.dart';
import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
import 'aboutUs.dart';
import 'delivery.dart';
import 'favorites.dart';
import 'history.dart';
import 'loginlogout.dart';
import 'messages.dart';
import 'notifications.dart';
import 'profile.dart';
import 'cart.dart';

// ignore: must_be_immutable
class HomePage extends StatefulWidget {
  final orderId = Uuid().v4();

  // ignore: non_constant_identifier_names
  List<Store> StoreItems = [];

  @override
  _HomePageState createState() => _HomePageState();
}

class _HomePageState extends State<HomePage> {
  BuildContext context;
  @override
  Widget build(BuildContext context) {
    this.context = context;
    return new Scaffold(
      appBar: new AppBar(
        title: new Text('Compu-Tech Store',
            style: new TextStyle(
                color: Colors.yellowAccent,
                fontWeight: FontWeight.bold,
                fontSize: 25.0)),
        centerTitle: true,
        actions: <Widget>[
          new IconButton(
              icon: new Icon(
                Icons.favorite,
                color: Colors.white,
              ),
              onPressed: () {
                Navigator.of(context).push(new CupertinoPageRoute(
                    builder: (BuildContext context) =>
                        new CompuTechFavorities()));
              }),
          new Stack(
            children: <Widget>[
              new IconButton(
                  icon: new Icon(
                    Icons.chat,
                    color: Colors.white,
                  ),
                  onPressed: () {
                    Navigator.of(context).push(new CupertinoPageRoute(
                        builder: (BuildContext context) =>
                            new CompuTechMassages()));
                  }),
              new CircleAvatar(
                radius: 10.0,
                backgroundColor: Colors.red,
                child: new Text(
                  '0',
                  style: new TextStyle(color: Colors.white, fontSize: 12.0),
                ),
              ),
            ],
          ),
        ],
      ),
      body: new Center(
        child: new Column(
          children: <Widget>[
            new Flexible(
              child: new GridView.builder(
                gridDelegate: new SliverGridDelegateWithFixedCrossAxisCount(
                    crossAxisCount: 2),
                itemCount: Store.StoreItems.length,
                itemBuilder: (BuildContext context, int index) {
                  return new Card(
                    child: new Stack(
                      alignment: FractionalOffset.bottomCenter,
                      children: <Widget>[
                        new Column(
                          mainAxisAlignment: MainAxisAlignment.spaceBetween,
                          children: <Widget>[
                            new Container(
                              decoration: new BoxDecoration(
                                  image: new DecorationImage(
                                      fit: BoxFit.fitWidth,
                                      image: new AssetImage(
                                          Store.StoreItems[index].itemImage))),
                            ),
                            new Text(
                              'R${Store.StoreItems[index].itemPrice}',textAlign: TextAlign.center,
                              style: new TextStyle(fontWeight: FontWeight.w700,fontSize: 16.0,
                                  color: Colors.red[500]),
                            ),
                          ],
                        ),
                      ],
                    ),
                  );
                },
              ),
            ),
          ],
        ),
      ),
      floatingActionButton: new Stack(
        children: <Widget>[
          new FloatingActionButton(
            onPressed: () {
              Navigator.of(context).push(new CupertinoPageRoute(
if u look at my code its from line 90 going down hope that someone can help me
Johannes Milke
@JohannesMilke_twitter
Hello! I have created another video about "Flutter Tutorial - Calendar Events App" https://www.youtube.com/watch?v=LoDtxRkGDTw alt
Bilawal Asghar
@tech35
Flutter doesn't work on my computer could someone help?
I have issues whenever I do anything related to flutter
vaibhav891
@vaibhav891

For my flutter app, one of my user is complaining that the app is not working properly on his device. No data is shown. However, I am not able to reproduce the issue on my local device.

I want to understand is there a way by which I could debug what is happening at his end? this is not a published app. I have shared the apk file over google drive.

any help will be much appreciated. Thanks in advance.

Johannes Milke
@JohannesMilke_twitter
Hello! I have created another video about "Flutter Tutorial - Animated List & Todo List - Insert & Remove Items" https://www.youtube.com/watch?v=E3SQOqUq8Mg alt
Byron Mackay
@bqmackay
I've started a YouTube weekly show for Flutter news. Stay up to date with all things Flutter. https://www.youtube.com/watch?v=rhhvTi9lzPo