React Native: Text onPress not working on android

Advertisements I have the following code: <Text onPress={() => console.log(‘this won\’t print’)}>Dumb text</Text> According to React Native’s documentation, this works great in both iOS and Android, however when I run it myself, it only works on iOS, while Android acts as if the onPress prop doesn’t exist at all. I know I can use TouchableOpacity… Read More React Native: Text onPress not working on android

Flutter function that returns conditional does not give correct result

Advertisements I have a code like this: //… child: ListTile( leading: CircleAvatar( backgroundImage: NetworkImage("${snapshot.data!.docs[index].data()[‘urunFotografi’]}"), ), title: Text(snapshot.data!.docs[index].data()["urunAdi"], style: TextStyle(fontSize: 20),), subtitle: Text(adetVeyaKilo().toString(), style: TextStyle(fontSize: 15),), ), // … // … Future<String> adetVeyaKilo() async { String state = ""; FirebaseFirestore.instance.collection(‘bolatAktar’).where(‘urunAdi’, isEqualTo: urunAdi).get().then((value) { value.docs.forEach((element) { if (element.data()["urunBirimi"] == "Adet") { state = "Adet"; } if (element.data()["urunBirimi"]… Read More Flutter function that returns conditional does not give correct result

StatefulWidget (setState not work did't show )

Advertisements import ‘package:flutter/material.dart’; class CounterScreen extends StatefulWidget { const CounterScreen({Key? key}) : super(key: key); @override State<CounterScreen> createState() { return _CounterScreenState(); } } class _CounterScreenState extends State<CounterScreen> { int number=1; @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: Text( "Counter" ), ), body: Center( child: Row( mainAxisAlignment: MainAxisAlignment.center, children: [ TextButton(onPressed: (){ number–;} ,… Read More StatefulWidget (setState not work did't show )