@@ -98,85 +98,112 @@ class _ChampionshipScreenState extends State<ChampionshipScreen> {
9898 trailing: Row (
9999 mainAxisSize: MainAxisSize .min,
100100 children: [
101- IconButton (
102- onPressed: () async {
103- final TextEditingController controller =
104- TextEditingController ();
105- await showCustomBottomSheet (
106- context,
107- SizedBox (
108- child: Padding (
109- padding: EdgeInsets .fromLTRB (
110- 30 ,
111- 15 ,
112- 30 ,
113- MediaQuery .of (context).viewInsets.bottom,
114- ),
115- child: Column (
116- mainAxisSize: MainAxisSize .min,
117- children: [
118- Padding (
119- padding: EdgeInsets .only (bottom: 20 ),
120- child: Text (
121- AppLocalizations .of (context)!
122- .customErgastUrl,
123- style: TextStyle (fontSize: 20 ),
101+ Padding (
102+ padding: EdgeInsets .only (right: 5 ),
103+ child: IconButton (
104+ onPressed: () async {
105+ final TextEditingController controller =
106+ TextEditingController ();
107+ await showCustomBottomSheet (
108+ context,
109+ SizedBox (
110+ child: Padding (
111+ padding: EdgeInsets .fromLTRB (
112+ 30 ,
113+ 15 ,
114+ 30 ,
115+ MediaQuery .of (context).viewInsets.bottom,
116+ ),
117+ child: Column (
118+ mainAxisSize: MainAxisSize .min,
119+ children: [
120+ Padding (
121+ padding: EdgeInsets .only (bottom: 20 ),
122+ child: Text (
123+ AppLocalizations .of (context)!
124+ .customErgastUrl,
125+ style: TextStyle (fontSize: 20 ),
126+ ),
127+ ),
128+ TextField (
129+ controller: controller,
130+ decoration: InputDecoration (
131+ border: OutlineInputBorder (),
132+ hintText: ergastUrl,
133+ hintStyle: TextStyle (
134+ fontWeight: FontWeight .w100,
135+ ),
136+ ),
124137 ),
125- ),
126- TextField (
127- controller: controller,
128- decoration: InputDecoration (
129- border: OutlineInputBorder (),
130- hintText: ergastUrl,
131- hintStyle: TextStyle (
132- fontWeight: FontWeight .w100,
138+ Padding (
139+ padding:
140+ EdgeInsets .only (top: 20 , bottom: 7 ),
141+ child: Container (
142+ width: double .infinity,
143+ height: 50 ,
144+ child: FilledButton .tonal (
145+ onPressed: () {
146+ Hive .box ('settings' ).put (
147+ 'ergastUrl' ,
148+ controller.text,
149+ );
150+ Navigator .of (context).pop ();
151+ setState (() {});
152+ },
153+ child: Text (
154+ AppLocalizations .of (context)!
155+ .save,
156+ ),
157+ ),
133158 ),
134159 ),
135- ),
136- Padding (
137- padding:
138- EdgeInsets .only (top: 20 , bottom: 7 ),
139- child: Container (
140- width: double .infinity,
141- height: 50 ,
142- child: FilledButton .tonal (
143- onPressed: () {
144- Hive .box ('settings' ).put (
145- 'ergastUrl' ,
146- controller.text,
147- );
148- Navigator .of (context).pop ();
149- setState (() {});
150- },
151- child: Text (
152- AppLocalizations .of (context)! .save,
160+ Padding (
161+ padding:
162+ EdgeInsets .only (top: 7 , bottom: 7 ),
163+ child: Container (
164+ width: double .infinity,
165+ height: 50 ,
166+ child: OutlinedButton (
167+ onPressed: () {
168+ Hive .box ('settings' ).put (
169+ 'ergastUrl' ,
170+ Constants ().ERGAST_API_URL ,
171+ );
172+ Navigator .of (context).pop ();
173+ setState (() {});
174+ },
175+ child: Text (
176+ AppLocalizations .of (context)!
177+ .reset,
178+ ),
153179 ),
154180 ),
155181 ),
156- ),
157- Padding (
158- padding:
159- EdgeInsets .only (top: 7 , bottom: 20 ),
160- child: Container (
161- width: double .infinity,
162- height: 50 ,
163- child: OutlinedButton (
164- onPressed: () {
165- Navigator .of (context).pop ();
166- },
167- child: Text (
168- AppLocalizations .of (context)! .close,
182+ Padding (
183+ padding:
184+ EdgeInsets .only (top: 7 , bottom: 20 ),
185+ child: Container (
186+ width: double .infinity,
187+ height: 50 ,
188+ child: OutlinedButton (
189+ onPressed: () {
190+ Navigator .of (context).pop ();
191+ },
192+ child: Text (
193+ AppLocalizations .of (context)!
194+ .close,
195+ ),
169196 ),
170197 ),
171198 ),
172- ) ,
173- ] ,
199+ ] ,
200+ ) ,
174201 ),
175202 ),
176- ),
177- );
178- } ,
179- icon : Icon ( Icons .settings_outlined ),
203+ );
204+ },
205+ icon : Icon ( Icons .settings_outlined) ,
206+ ),
180207 ),
181208 Radio (
182209 value: false ,
0 commit comments