Common Basic Features - InspireUI Support
Common Basic Features - InspireUI Support
com
This guide explains the way to configure the basic config and all
common features (also the UI that is not available on FluxBuilder
tool), such as Product Detail screen, Upload file on product,
Settings screen (Page view, Web view), Logo, Splash screen,
Onboarding (welcome screen), Login mode, Deep Link, price
Filters, Loading Animation screen, Drawer Layout (Left menu), etc.
"productVariantLayout": {
"color": "color",
"size": "box",
"height": "option",
"color-image": "image"
},
"productVariantLanguage": {
"en": {
"color": "Color",
"size": "Size",
"height": "Height",
"color-image": "Color"
},
"ar": {
"color": ""ﺍﻟﻠﻮﻥ,
"size": ""ﺑﺤﺠﻢ,
"height": ""ﺍﺭﺗﻔﺎﻉ,
"color-image": ""ﺍﻟﻠﻮﻥ
},
"vi": {
"color": "Màu",
"size": "Kích thước",
"height": "Chiều Cao",
"color-image": "Màu"
}
},
"productDetail": {
"height": 0.4,
"marginTop": 0,
...
},
marginTop the top margin with the top edge. This setting is to
prevent cutting without using SafeArea widget.
"advanceConfig": {
"DefaultLanguage": "en",
"DetailedBlogLayout": "halfSizeImageType",
"EnablePointReward": true,
"hideOutOfStock": false,
"EnableRating": true,
"hideEmptyProductListRating": true,
"EnableShipping": true,
The new release also supports the Affiliate Product Type when
you configure values from the WooCommerce site.
marginTop: the top margin with the top edge. This setting is to
prevent cutting without using SafeArea widget.
safeArea: add new extra space on the top when viewing product
detail.
2. Settings screen
1. About Us
class SettingConstants {
static const aboutUsUrl = "https://inspireui.com
/about"; // replace your url here
}
To change title of About Us, open lib/screens/settings
/settings.dart file to change About us URL as below: (for
version 1.6.4 and earlier, refer to lib/screens/settings.dart).
case 'about':
{
icon = CupertinoIcons.info;
title = "About Us"; //replace your
title here
trailing =
const Icon(Icons.arrow_forward_ios,
size: 18, color: kGrey600);
onTap = () => Navigator.push(
context,
MaterialPageRoute(
builder: (context) => WebView(
url: "https://inspireui.com
/about", //replace your url here
title: "About Us"), //replace
your title here
));
break;
}
2. App Rating
3. Page View
Page view is used to display a static page faster than using
WebView. For those who want to customize a page view, at this
moment, please follow the instructions below.
4. Web View
In spite of the fact that a Web View widget takes more time to load
compared to a Page View, Web View sometimes it could be
taken into consideration due to its flexibility and adaptability. In
order to add a WebView inside your app, please follow the guide
below.
To add/delete/change a webview widget on your Settings screen,
open lib/env.dart, add/delete the value: (For version 1.9.x and
earlier, refer to lib/common/config/general.dart, in defaultSettings)
case 'about':
{
icon = CupertinoIcons.info;
title = "FAQ"; //replace your title
here
trailing =
const Icon(Icons.arrow_forward_ios,
size: 18, color: kGrey600);
onTap = () => Navigator.push(
context,
MaterialPageRoute(
builder: (context) => WebView(
url: "https://inspireui.com
/faq", //replace your url here
title: "FAQ"), //replace your
title here
));
break;
}
Navigate to lib/app.dart:
/// Build the App Theme
ThemeData getTheme(context) {
printLog("[AppState] build Theme");
const kProfileBackground =
"https://images.unsplash.com/photo-
1494253109108-2e30c049369b?ixlib=rb-1.2.1&
auto=format&fit=crop&w=3150&q=80";
This part guides to change the Splash screen and change logo
from other screens as Login screen, Left menu. To change the
Logo from Homepage, please refer to Customize UI Layout on
the left menu, then choose 1. Logo Item.
To map your new image logo and icon file, update kLogoImage.
To use Rive 2, please use this config: (it is available from version
1.9.2 onwards)
// or
const kSplashScreen = "assets/images
/splashscreen.gif";
Please make sure the startAnimaiton from the app is the same on
your Flare Dashboard, otherwise, the animation will not work.
There is also a new feature to strictly check user login before using
the app by enabling IsRequiredLogin is true. Refer to
lib/env.dart (For version 1.9.x and earlier, refer to lib/common
/config/general.dart, in kLoginSetting):
"loginSetting": {
...
"IsRequiredLogin": true,
...
},
5. DeepLink
If you are using Stripe payment, deep link is required for Stripe 3D
Secure transaction to work.
To configure deep link, you can choose either Android App Links
& iOS Universal Links (recommended, requires to upload two files
to your host) or Android Deep Links & iOS Custom URL
schemas. Follow this documentation for more details.
We will guide you step-by-step to config deep link using App Links
(Android) & Universal Links (iOS):
[
{
"relation": [
"delegate_permission/common.handle_all_urls"
],
"target": {
"namespace": "android_app",
"package_name":
"com.inspireui.fluxstore",
"sha256_cert_fingerprints": [
"a0:d4:a1:e4:08:46:1b:a3:2f:86:9d:90:04:b7:81:78:d6:54:f2:16:99:24:11:e4:d8:3d:18:96
]
}
}
]
{
"applinks": {
"apps": [],
"details": [
{
"appID":
"ABCDEFGH.com.inspireui.fluxstore",
"paths": [ "*" ]
}
]
}
}
Upload apple-app-site-association to
https://yourwebsite.com/.well-known/apple-app-site-
association
<data
android:scheme="https"
android:host="inspireui.com" /> ///replace
with your website
Replace inspireui.com with your website.
<key>com.apple.developer.associated-
domains</key>
<array>
<string>applinks:inspireui.com</string>
///replace with your website
<string>applinks:fluxstoreinspireui.page.link.
</string>
</array>
That's it. If you are using native Stripe payment, your returnUrl
should be like https://yourwebsite.com.
Open the Simulator and test the Deep link on your terminal.
// ios
xcrun simctl openurl booted
"fluxstore://inspireui.com/400"
// android
adb shell 'am start -W -a
android.intent.action.VIEW -c
android.intent.category.BROWSABLE -d
"fluxstore://inspireui.com/400" '
6. Price Filter
In the Filters, you can change the price filter. Currently, the lowest
price filter is 0-100. To change this price, refer to lib/common
/constants/slider.dart:
7. Loading Animation
The New Left menu side is now easier to navigate between the
Shop and other menu items. The menu could be opened by swiping
from left to right or trigger by this function
Scafford.of(context).openDrawer().
pushNavigation(RouteList.category);
},
),
ListTile(
leading: const Icon(
Icons.search,
size: 20,
),
title:
Text(S.of(context).search),
onTap: () {},
),
ListTile(
leading: const
Icon(Icons.settings, size: 20),
title:
Text(S.of(context).settings),
onTap: () {
if (kIsWeb) {
} else {
Navigator.of(context).pushNamed(RouteList.profile);
}
},
)
],
)
: const SizedBox();
}
case 'blog':
{
return ListTile(
leading: const
Icon(FontAwesomeIcons.wordpress, size: 20),
title: Text(S.of(context).blog),
onTap: () =>
pushNavigation(RouteList.blogs),
);
}
case 'login':
{
return ListenableProvider.value(
value: Provider.of(context, listen:
false),
child: Consumer(builder: (context,
userModel, _) {
final loggedIn = userModel.loggedIn;
return ListTile(
leading: const
Icon(Icons.exit_to_app, size: 20),
title: loggedIn
? Text(S.of(context).logout)
: Text(S.of(context).login),
onTap: () {
if (loggedIn) {
Provider.of(context, listen:
false).logout();
if
(kLoginSetting['IsRequiredLogin'] ?? false) {
Navigator.of(context).pushNamedAndRemoveUntil(
RouteList.login,
(route) => false,
);
} else {
pushNavigation(RouteList.dashboard);
}
} else {
pushNavigation(RouteList.login);
}
},
);
}),
);
}
case 'category':
{
return buildListCategory();
}
default:
return Container();
}
}
drawer: Drawer(
child: SingleChildScrollView(
child: Column(
children: <Widget>[
DrawerHeader(
child: Row(
children: <Widget>[
Icons.shopping_basket,
size: 20,
),
title:
Text(S.of(context).shop),
onTap: () {
Navigator.pushReplacementNamed(context, "/home");
},
),
ListTile(
leading:
Icon(FontAwesomeIcons.wordpress, size: 20),
title:
Text(S.of(context).blog),
onTap: () {
Navigator.pushNamed(context, "/blogs");
},
),
ListTile(
leading:
Icon(FontAwesomeIcons.heart, size: 20),
title:
Text(S.of(context).myWishList),
onTap: () {
Navigator.pushNamed(context, "/wishlist");
},
),
ListTile(
leading:
Icon(Icons.exit_to_app, size: 20),
title:
loggedIn
?
Text(S.of(context).logout)
:
Text(S.of(context).login),
onTap: () {
loggedIn
?
Provider.of<UserModel>(context).logout()
:
Navigator.pushNamed(context, "/login");
},
),
SizedBox(
height: 20,
),
ExpansionTile(
initiallyExpanded: true,
title: Text(
S.of(context).byCategory.toUpperCase(),
style:
TextStyle(
fontSize: 14,
fontWeight: FontWeight.w600,
color:
Theme.of(context)
.accentColor
.withOpacity(0.5),
),
),
children:
showCategories(),
),
],
),
)
],
),
),
),
9. Google Analytics