Hello, working on a Flutter Sports App in Android Studio for a school project and unaware of some things:
The sports app allows you to enter two players to compare in two text form field controllers.
I have names of the players and their pictures in a List
How can I pass the buildplayercard (or just name and pictures of the 2 players entered) corelating to the players entered in the two text form fields on the first route (first screen) to the second route (second screen) and have them displayed beside each other for a stat comparison?
The code is as follows (please send back modified code if possible):
import 'package:flutter/material.dart'; void main() { runApp( MaterialApp( routes: { '/': (context) => FirstRoute(), '/second': (context) => SecondRoute(), }, initialRoute: '/', ), ); } class FirstRoute extends StatefulWidget { @override State createState() => _FirstRouteState(); } class _FirstRouteState extends State { final GlobalKey _formKey = GlobalKey(); final String siakamPath = 'images/siakam.jpg'; final String anunobyPath = 'images/anunoby.jpg'; final String poeltlPath = 'images/poeltl.png'; final String barnesPath = 'images/barnes.jpg'; final String vanvleetPath = 'images/vanvleet.jpg'; final String achiuwaPath = 'images/achiuwa.jpg'; final String bartonPath = 'images/barton.png'; final String trentjrPath = 'images/trentjr.png'; final String youngPath = 'images/young.png'; final String boucherPath = 'images/boucher.jpg'; var _player1FieldController = TextEditingController(); var _player2FieldController = TextEditingController(); List