Click here to Skip to main content
15,880,047 members
Home / Discussions / Mobile
   

Mobile

 
PinnedForum Guidelines - PLEASE READ PinPopular
Chris Maunder28-Jul-09 2:38
cofounderChris Maunder28-Jul-09 2:38 
QuestionError using google_maps_flutter: ^2.5.0 in flutter Pin
Luis M. Rojas4-Dec-23 2:06
Luis M. Rojas4-Dec-23 2:06 
AnswerRe: Error using google_maps_flutter: ^2.5.0 in flutter Pin
Richard MacCutchan4-Dec-23 2:11
mveRichard MacCutchan4-Dec-23 2:11 
GeneralRe: Error using google_maps_flutter: ^2.5.0 in flutter Pin
Richard Deeming4-Dec-23 2:17
mveRichard Deeming4-Dec-23 2:17 
GeneralRe: Error using google_maps_flutter: ^2.5.0 in flutter Pin
Richard MacCutchan4-Dec-23 2:25
mveRichard MacCutchan4-Dec-23 2:25 
GeneralRe: Error using google_maps_flutter: ^2.5.0 in flutter Pin
Luis M. Rojas4-Dec-23 2:33
Luis M. Rojas4-Dec-23 2:33 
GeneralRe: Error using google_maps_flutter: ^2.5.0 in flutter Pin
Richard MacCutchan4-Dec-23 2:37
mveRichard MacCutchan4-Dec-23 2:37 
GeneralRe: Error using google_maps_flutter: ^2.5.0 in flutter Pin
Andre Oosthuizen5-Dec-23 8:55
mveAndre Oosthuizen5-Dec-23 8:55 
GeneralRe: Error using google_maps_flutter: ^2.5.0 in flutter Pin
jschell4-Dec-23 3:43
jschell4-Dec-23 3:43 
GeneralRe: Error using google_maps_flutter: ^2.5.0 in flutter Pin
Richard MacCutchan4-Dec-23 4:59
mveRichard MacCutchan4-Dec-23 4:59 
RantHelp Backend - OLX Clone App in React Native Pin
Member 161106429-Oct-23 1:15
Member 161106429-Oct-23 1:15 
QuestionSignificance of AI in mobile app development Pin
kesavan santhinikethan29-Oct-22 0:47
professionalkesavan santhinikethan29-Oct-22 0:47 
AnswerRe: Significance of AI in mobile app development Pin
Member 158891079-Jan-23 8:15
Member 158891079-Jan-23 8:15 
GeneralRe: Significance of AI in mobile app development Pin
Android Pocket 24-Oct-23 9:47
Android Pocket 24-Oct-23 9:47 
AnswerRe: Significance of AI in mobile app development Pin
mellissahow12-Apr-24 0:17
mellissahow12-Apr-24 0:17 
QuestionFood Delivery App Development Pin
nithin sethu28-Oct-22 3:25
nithin sethu28-Oct-22 3:25 
AnswerRe: Food Delivery App Development Pin
Jignen Pandya19-Apr-23 22:18
professionalJignen Pandya19-Apr-23 22:18 
Questioncan anyone help me to solve this error? Pin
Member 1579646613-Oct-22 0:51
Member 1579646613-Oct-22 0:51 
import 'package:flutter/material.dart';
import './practice2.dart';
import './practice3.dart';
void main()
{
  runApp(MaterialApp(home:Akanksha()));
}
class Akanksha extends StatefulWidget {
  @override
  State<StatefulWidget> createState() {
    return AkankshaState();
  }
}

class AkankshaState extends State<Akanksha>{
  final questions=const[
    {'questionText':'what is your favourite colour?','answers':['black','green','blue'],
    },
    {'questionText':'what is your fav drama?','answers':['black','green','blue'],
    },
    {'questionText':'what is your favourite animal?','answers':['black','green','blue'],
    },
  ];
  var _questionIndex=0;
  void answerQuestion(){
    // var aBool=true;
    // aBool=false;
    setState((){
_questionIndex= _questionIndex+1;
    });
print(_questionIndex);
    if (_questionIndex<questions.length){print('We have more question!');}
else{print('no more questions!');}
  }
  @override
  Widget build(BuildContext context) {


    return Scaffold(
      appBar:AppBar(backgroundColor: Colors.deepOrange,
          title:Text('my app')),
      body:_questionIndex<questions.length ?
      Column(
         //mainAxisAlignment: MainAxisAlignment,
         children: [
           Question( questions[_questionIndex]['questionText'], ), ...
           (
               questions[_questionIndex]['answers'] as List).map((answer){
  return Answer(answerQuestion , answer);
      }).toList(),
// Answer(answerQuestion),
//
// Answer(answerQuestion),
//
//            Answer(answerQuestion),
         ],
       ): Center(child:Text('you did it!')),

    );
  }
}
import 'package:flutter/material.dart';
import './practice2.dart';
import './practice3.dart';
void main()
{
  runApp(MaterialApp(home:Akanksha()));
}
class Akanksha extends StatefulWidget {
  @override
  State<StatefulWidget> createState() {
    return AkankshaState();
  }
}

class AkankshaState extends State<Akanksha>{
  final questions=const[
    {'questionText':'what is your favourite colour?','answers':['black','green','blue'],
    },
    {'questionText':'what is your fav drama?','answers':['black','green','blue'],
    },
    {'questionText':'what is your favourite animal?','answers':['black','green','blue'],
    },
  ];
  var _questionIndex=0;
  void answerQuestion(){
    // var aBool=true;
    // aBool=false;
    setState((){
_questionIndex= _questionIndex+1;
    });
print(_questionIndex);
    if (_questionIndex<questions.length){print('We have more question!');}
else{print('no more questions!');}
  }
  @override
  Widget build(BuildContext context) {


    return Scaffold(
      appBar:AppBar(backgroundColor: Colors.deepOrange,
          title:Text('my app')),
      body:_questionIndex<questions.length ?
      Column(
         //mainAxisAlignment: MainAxisAlignment,
         children: [
           Question( questions[_questionIndex]['questionText'], ), ...
           (
               questions[_questionIndex]['answers'] as List).map((answer){
  return Answer(answerQuestion , answer);
      }).toList(),

         ],
       ): Center(child:Text('you did it!')),

    );
  }
}
 :wtf: 


-----------------------------------------------
import 'package:flutter/material.dart';
class Question extends StatelessWidget {
 //final String questionText;
 // Question(this.questionText);
 String questionText;
 Question(this.questionText);
  @override
  Widget build(BuildContext context) {
    return Container(
      margin: EdgeInsets.all(20),
        width: double.infinity,
       child:Text(questionText,style:TextStyle(fontSize: 25),textAlign: TextAlign.center,)

       // child: Text(questionText,style:TextStyle(fontSize: 25),textAlign:TextAlign.center,)
   );
  }
}

------------------------------------------------------------------
import 'package:flutter/material.dart';
class Answer extends StatelessWidget {
  final Function selectHandler;
  final String answerText;
Answer(this.selectHandler, String this.answerText);
  @override
  Widget build(BuildContext context) {
    return Container(
      width:double.infinity,
      child:ElevatedButton(
          style: TextButton.styleFrom(backgroundColor: Colors.blueGrey,
              shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10))),
          onPressed: ()=> selectHandler(),
          child:Text(answerText,style:TextStyle(color:Colors.white,fontSize:20))),
    );
  }
}

AnswerRe: can anyone help me to solve this error? Pin
Richard MacCutchan13-Oct-22 1:13
mveRichard MacCutchan13-Oct-22 1:13 
SuggestionRe: can anyone help me to solve this error? Pin
David Crow13-Oct-22 3:16
David Crow13-Oct-22 3:16 
QuestionXamarin using C#: System.NullReferenceException: 'Object reference not set to an instance of an object.' Pin
Luis M. Rojas22-Jul-22 7:18
Luis M. Rojas22-Jul-22 7:18 
AnswerRe: Xamarin using C#: System.NullReferenceException: 'Object reference not set to an instance of an object.' Pin
Richard MacCutchan22-Jul-22 21:23
mveRichard MacCutchan22-Jul-22 21:23 
GeneralRe: Xamarin using C#: System.NullReferenceException: 'Object reference not set to an instance of an object.' Pin
Luis M. Rojas23-Jul-22 3:34
Luis M. Rojas23-Jul-22 3:34 
GeneralRe: Xamarin using C#: System.NullReferenceException: 'Object reference not set to an instance of an object.' Pin
Richard MacCutchan23-Jul-22 8:14
mveRichard MacCutchan23-Jul-22 8:14 
GeneralRe: Xamarin using C#: System.NullReferenceException: 'Object reference not set to an instance of an object.' Pin
Luis M. Rojas23-Jul-22 11:59
Luis M. Rojas23-Jul-22 11:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.