You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
question:'package:flutter/src/widegets/text.dart':failed assertion:line 235 pos 15 : 'data ! = NULL ' : is not true code: #31785
This is a question better suited for StackOverflow, since there doesn’t seem to be anything wrong with Flutter itself. Closing, as this is not an issue report. See https://flutter.dev/community for support options.
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
sarahalramly commentedon Apr 29, 2019
import 'package:flutter/material.dart';
import 'dart:async';
import 'package:http/http.dart' as http;
import 'dart:convert';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@OverRide
Widget build(BuildContext context) {
return MaterialApp(
title: "الواجهه الرئيسية",
debugShowCheckedModeBanner: false,
theme: new ThemeData(
primarySwatch: Colors.green[700]
),
home: new MyhomePage(title: 'الاسئلة'),
);
}
}
class MyhomePage extends StatefulWidget {
MyhomePage({Key key , this.title}):super(key:key);
final String title;
@OverRide
_MyhomePageState createState()=> _MyhomePageState();
}
class _MyhomePageState extends State {
var stringData = "";
Future <List> _getQu() async{
var data= await http.get("http://www.json-generator.com/api/json/get/cfwZmvEBbc?indent=2");
var jsonData =json.decode(data.body);
List qu =[];
for(var u in jsonData){
Qu qur = Qu(u["questions"],u["ansar"]);
qu.add(qur);
}
print(qu.length);
return qu;
Widget build(BuildContext context){
return new Scaffold(
appBar: new AppBar(
title: new Text(widget.title),
),
body: Container(
child: FutureBuilder(
future: _getQu(),
builder: (BuildContext context, AsyncSnapshot snapshot){
}
}
class Qu {
final String questions;
final bool ansar;
Qu(this.questions, this.ansar);
}
baderouaich commentedon Apr 29, 2019
FutureBuilder<List> ( future: _getBookList(), builder: (context, snapshot) { if (snapshot.hasData) { return ListView.builder( itemCount: snapshot.data.length, itemBuilder: (BuildContext context, int index){ return ListTile( title: Text(snapshot.data[index].questions), ); }, ); } else if (snapshot.hasError) { return Text("${snapshot.error}"); } // By default, show a loading spinner return CircularProgressIndicator(); }, )BondarenkoStas commentedon Oct 16, 2019
This is a question better suited for StackOverflow, since there doesn’t seem to be anything wrong with Flutter itself. Closing, as this is not an issue report. See https://flutter.dev/community for support options.
github-actions commentedon Aug 26, 2021
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.