Beranda › Forums › Belajar Flutter Mobile Apps Tingkat Pemula › membuat aplikasi kuis part VII
Tagged: membuat aplikasi kuis part VII
- This topic has 7 replies, 5 voices, and was last updated 3 years, 2 months ago by Anonymous.
-
AuthorPosts
-
December 22, 2022 at 3:49 PM #190776
halo coach mau nanya nih ada muncul eror mau posting screenshoot ga bisa jadi ini saya ketikan aja erornya di bagian yang saya bold “handlePilih”
import ‘package:flutter/material.dart’;
class jawaban extends StatelessWidget {
// const MyWidget({super.key});Function handlePilih;
jawaban(this.handlePilih);@override
Widget build(BuildContext context) {
return Container(
width: double.infinity,
child: ElevatedButton(
onPressed: handlePilih, //muncul eror The argument type ‘Function’ can’t be assigned to the parameter type ‘void Function()?’.dartargument_type_not_assignable”style: ElevatedButton.styleFrom(
primary: Colors.grey,
),
child: Text(‘jawaban 1’),
),
);
}
}December 30, 2022 at 7:38 PM #191021Anonymoussepertinya berbeda dari ini ya
import 'package:flutter/material.dart'; class Jawaban extends StatelessWidget { final Function handlePilih; final String jawabanText; Jawaban(this.handlePilih, this.jawabanText); @override Widget build(BuildContext context) { return Container( width: double.infinity, child: ElevatedButton( onPressed: handlePilih, style: ElevatedButton.styleFrom( primary: Colors.blue, ), child: Text('jawaban1'), ), ); } }January 24, 2023 at 9:00 PM #191649done, coach thankyou
January 30, 2023 at 12:21 PM #191819Anonymousoke sama sama
June 7, 2023 at 10:39 AM #197306sama saya juga tidak bisa coach
import ‘package:flutter/material.dart’;
class Jawaban extends StatelessWidget {
// const Jawaban({super.key});
Function handlePilih;Jawaban(this.handlePilih);
@override
Widget build(BuildContext context) {
return Container(
child: ElevatedButton(onPressed: handlePilih, child: Text(‘Jawaban 1’)), //handlePilih error
);
}
}June 9, 2023 at 10:57 AM #197536Anonymouskalau masalah ada dimananya ya ?
September 1, 2023 at 9:02 PM #205048“message”: “The argument type ‘Function’ can’t be assigned to the parameter type ‘void Function()?’.”,
ada garis merah dibagian handlePilih untuk onPressed coach
September 7, 2023 at 2:06 PM #205329Anonymousfunction handlenya tidak terpanggil dari page sebelumnya boleh dicheck ?
-
AuthorPosts
- You must be logged in to reply to this topic.