final
This commit is contained in:
@@ -12,7 +12,7 @@ import '../../utils/utils.dart';
|
||||
class CreateOnlineStore1 extends StatefulWidget {
|
||||
final int businessId;
|
||||
|
||||
const CreateOnlineStore1(this.businessId, {Key key}) : super(key: key);
|
||||
const CreateOnlineStore1(this.businessId, {Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<StatefulWidget> createState() {
|
||||
@@ -30,12 +30,12 @@ class CreateOnlineStore1State extends State<CreateOnlineStore1> {
|
||||
bool canSubmit = false;
|
||||
|
||||
List<dynamic> stores = [];
|
||||
Map<String, dynamic> service;
|
||||
Map<String, dynamic>? service;
|
||||
dynamic selectedStore;
|
||||
|
||||
Group group;
|
||||
Group? group;
|
||||
|
||||
String selectedDomain;
|
||||
String? selectedDomain;
|
||||
List<dynamic> domainResult = [];
|
||||
|
||||
@override
|
||||
@@ -136,7 +136,7 @@ class CreateOnlineStore1State extends State<CreateOnlineStore1> {
|
||||
),
|
||||
),
|
||||
);
|
||||
Map<String, dynamic> existing_web_svc;
|
||||
Map<String, dynamic>? existing_web_svc;
|
||||
if (selectedStore != null && (selectedStore['services'] as List).length > 0) {
|
||||
for (Map<String, dynamic>svc in (selectedStore['services'] as List)) {
|
||||
if (svc['code'] == Constants.WEB_MINISTORE_SERVICE) {
|
||||
@@ -187,8 +187,8 @@ class CreateOnlineStore1State extends State<CreateOnlineStore1> {
|
||||
onPressed: () {
|
||||
Navigator.pushReplacement(context, MaterialPageRoute(
|
||||
builder: (BuildContext context) =>
|
||||
BuyService(group.id, Constants.WEB_MINISTORE_SERVICE,
|
||||
domain: existing_web_svc['domain'],
|
||||
BuyService(group!.id, Constants.WEB_MINISTORE_SERVICE,
|
||||
domain: existing_web_svc!['domain'],
|
||||
sid: existing_web_svc['store']['id'],
|
||||
),
|
||||
));
|
||||
@@ -230,8 +230,8 @@ class CreateOnlineStore1State extends State<CreateOnlineStore1> {
|
||||
fontSize: 18.0
|
||||
),
|
||||
autofocus: true,
|
||||
validator: (String value) {
|
||||
if (value.trim().isEmpty) {
|
||||
validator: (String? value) {
|
||||
if (value == null || value.trim().isEmpty) {
|
||||
return S.of(context).domains_separated_comma;
|
||||
}
|
||||
return null;
|
||||
@@ -269,7 +269,7 @@ class CreateOnlineStore1State extends State<CreateOnlineStore1> {
|
||||
Container(
|
||||
padding: EdgeInsets.only(top: 8.0),
|
||||
child: Text(
|
||||
service['description'],
|
||||
service!['description'],
|
||||
),
|
||||
),
|
||||
);
|
||||
@@ -277,7 +277,7 @@ class CreateOnlineStore1State extends State<CreateOnlineStore1> {
|
||||
Container(
|
||||
padding: EdgeInsets.only(top: 8.0),
|
||||
child: Text(
|
||||
service['options'][0]['name'],
|
||||
service!['options'][0]['name'],
|
||||
),
|
||||
),
|
||||
);
|
||||
@@ -285,7 +285,7 @@ class CreateOnlineStore1State extends State<CreateOnlineStore1> {
|
||||
Container(
|
||||
padding: EdgeInsets.only(top: 8.0),
|
||||
child: Text(
|
||||
'\$${service['options'][0]['price']}',
|
||||
'\$${service!['options'][0]['price']}',
|
||||
style: TextStyle(
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.bold,
|
||||
@@ -304,7 +304,7 @@ class CreateOnlineStore1State extends State<CreateOnlineStore1> {
|
||||
onPressed: () {
|
||||
Navigator.pushReplacement(context, MaterialPageRoute(
|
||||
builder: (BuildContext context) =>
|
||||
BuyService(group.id, Constants.WEB_MINISTORE_SERVICE,
|
||||
BuyService(group!.id, Constants.WEB_MINISTORE_SERVICE,
|
||||
domain: selectedDomain,
|
||||
sid: selectedStore['id'],
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user