please review my code. i want to try ListView.builder. there are no error but can not run the app (still loading). my reference is here: https://flutter.dev/docs/get-started/codelab--import 'package:english_words/english_words.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class testApp extends StatefulWidget {
@override
State<StatefulWidget> createState() {
return _testApp();
}
}
class _testApp extends State<testApp> {
final _suggestions = <WordPair>[];
final _biggerFont = const TextStyle(fontSize: 18.0);
Widget _buildRow(WordPair pair) {
return ListTile(
title: Text(
pair.asPascalCase,
style: _biggerFont,
),
);
}
Widget _buildSuggestions() {
return ListView.builder(
shrinkWrap: true,
padding: const EdgeInsets.all(16.0),
itemBuilder: /*1*/ (context, i) {
if (i.isOdd) return Divider();
/*2*/
final index = i ~/ 2; /*3*/
if (index >= _suggestions.length) {
_suggestions.addAll(generateWordPairs().take(10)); /*4*/
}
return _buildRow(_suggestions[index]);
});
}
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Aplikasi',
home: Scaffold(
body: Column(
mainAxisAlignment: MainAxisAlignment.center,
textDirection: TextDirection.ltr,
children: <Widget>[
Text('Hello World'),
Padding(
padding: EdgeInsets.all(20),
child: Text('Hello World'),
),
Text('Hello World'),
Text('Hello World'),
Card(
color: Colors.yellow,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
ListTile(
leading: Icon(Icons.fastfood),
title: Text('Angga Arya Saputra'),
subtitle: Text('Ini subtitle nya'),
),
ListTile(
leading: Icon(Icons.fastfood),
title: Text('Angga Arya Saputra'),
subtitle: Text('Ini subtitle nya'),
),
ListTile(
leading: Icon(Icons.fastfood),
title: Text('Angga Arya Saputra'),
subtitle: Text('Ini subtitle nya'),
),
],
)),
Padding(
padding: EdgeInsets.fromLTRB(8, 14, 8, 14),
child: Card(
color: Colors.blueGrey,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
ListTile(
leading: Icon(Icons.fastfood),
title: Text('Angga Arya Saputra'),
subtitle: Text('Ini subtitle nya'),
),
ListTile(
leading: Icon(Icons.fastfood),
title: Text('Angga Arya Saputra'),
subtitle: Text('Ini subtitle nya'),
),
],
)),
),
_buildSuggestions(), //i want to add ListView.builder()
])),
);
}}
You received this message because you are subscribed to the Google Groups "Flutter Development (flutter-dev)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flutter-dev/87851f41-65d4-4012-91d4-5a92d48d11c2%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Flutter Development (flutter-dev)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flutter-dev/bc8f8df9-1462-47d3-bfce-7071c22f14c6%40googlegroups.com.
(I don’t run other people’s code)> blank whiteNo “Hello world” message in the column?What happens if you remove _buildSuggestions from the column?
On Tue, Apr 14, 2020 at 9:43 AM Adam <anggaca...@gmail.com> wrote:
yes, i have connect to the internet. the build is complete now. but it just show blank white. no error message in Android studio too. may you try to run my code in your machine?--
Pada Selasa, 14 April 2020 20.21.56 UTC+7, Souvik Dutta menulis:Have you ever built an app with your machine? If not then connect your machine to the internet. What is your machines configuration?
You received this message because you are subscribed to the Google Groups "Flutter Development (flutter-dev)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutt...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flutter-dev/36fdf4e1-3056-42ac-9058-6b45ac7df140%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flutter-dev/36fdf4e1-3056-42ac-9058-6b45ac7df140%40googlegroups.com.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Aplikasi',
home: Scaffold(
body: Column(
mainAxisAlignment: MainAxisAlignment.center,
textDirection: TextDirection.ltr,
children: <Widget>[
Text('Hello World'),
Text('Hello World 2'),
_buildSuggestions(),
To unsubscribe from this group and stop receiving emails from it, send an email to flutt...@googlegroups.com.

here is the preview when i am not adding ListView.builder()
Expanded()shrinkWrap: true--
You received this message because you are subscribed to the Google Groups "Flutter Development (flutter-dev)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flutter-dev/ec789ef0-3447-4d60-bef5-73e780286266%40googlegroups.com.