@@ -22,7 +22,6 @@ class _SetupScreenState extends State<SetupScreen> {
2222 int touchedTimes = 0 ;
2323 bool isLoading = false ;
2424 String domainError = "" ;
25- String baseDomain = ".lakasir.com" ;
2625
2726 @override
2827 void dispose () {
@@ -42,14 +41,10 @@ class _SetupScreenState extends State<SetupScreen> {
4241 }
4342
4443 try {
45- String domain = "https://${registerDomainController .text }" ;
46- if (environment == "local" ) {
47- domain = "http://${registerDomainController .text }" ;
48- }
49- domain = domain + baseDomain;
44+ String domain = registerDomainController.text;
5045
5146 await ApiService (domain).fetchData ('api' );
52- await storeSetup (registerDomainController.text + baseDomain );
47+ await storeSetup (registerDomainController.text);
5348 return true ;
5449 } catch (e) {
5550 setState (() {
@@ -71,60 +66,26 @@ class _SetupScreenState extends State<SetupScreen> {
7166 Container (
7267 margin: const EdgeInsets .only (top: 116 , bottom: 58 ),
7368 child: Center (
74- child: GestureDetector (
75- onTap: () {
76- setState (() {
77- touchedTimes++ ;
78- });
79-
80- if (touchedTimes == 5 ) {
81- var snackBar = SnackBar (
82- backgroundColor: Colors .transparent,
83- elevation: 0 ,
84- dismissDirection: DismissDirection .none,
85- padding: EdgeInsets .zero,
86- margin: const EdgeInsets .only (bottom: 15 ),
87- behavior: SnackBarBehavior .floating,
88- duration: const Duration (seconds: 2 ),
89- content: Center (
90- child: Container (
91- padding: const EdgeInsets .symmetric (
92- vertical: 10 , horizontal: 14 ),
93- decoration: BoxDecoration (
94- borderRadius: BorderRadius .circular (50 ),
95- color: const Color (0xff656565 ),
96- ),
97- child: const Text ('Using your own domain' ),
98- ),
99- ),
100- );
101- ScaffoldMessenger .of (context).showSnackBar (snackBar);
102- setState (() {
103- baseDomain = "" ;
104- });
105- }
106- },
107- child: RichText (
108- text: TextSpan (
109- style: const TextStyle (
110- fontSize: 32 ,
111- fontWeight: FontWeight .w600,
112- ),
113- children: [
114- TextSpan (
115- text: 'setup_title' .tr,
116- style: const TextStyle (color: Colors .black),
117- ),
118- const WidgetSpan (
119- child:
120- SizedBox (width: 8.0 ), // Add space between spans
121- ),
122- const TextSpan (
123- text: "LAKASIR" ,
124- style: TextStyle (color: primary),
125- ),
126- ],
69+ child: RichText (
70+ text: TextSpan (
71+ style: const TextStyle (
72+ fontSize: 32 ,
73+ fontWeight: FontWeight .w600,
12774 ),
75+ children: [
76+ TextSpan (
77+ text: 'setup_title' .tr,
78+ style: const TextStyle (color: Colors .black),
79+ ),
80+ const WidgetSpan (
81+ child:
82+ SizedBox (width: 8.0 ), // Add space between spans
83+ ),
84+ const TextSpan (
85+ text: "LAKASIR" ,
86+ style: TextStyle (color: primary),
87+ ),
88+ ],
12889 ),
12990 ),
13091 ),
@@ -137,9 +98,6 @@ class _SetupScreenState extends State<SetupScreen> {
13798 Container (
13899 margin: const EdgeInsets .only (bottom: 21.0 ),
139100 child: MyTextField (
140- prefixText:
141- environment == "local" ? "http://" : "https://" ,
142- suffixText: baseDomain,
143101 controller: registerDomainController,
144102 label: "setup_your_registered_domain" .tr,
145103 errorText: domainError,
0 commit comments