Commit cc8bf5b8 authored by Dio Maulana's avatar Dio Maulana

logo url

parent 0b825b15
......@@ -33,7 +33,6 @@ migrate_working_dir/
/build/
# Web related
lib/generated_plugin_registrant.dart
# Symbolication related
app.*.symbols
......
......@@ -92,7 +92,7 @@ class Api {
await prefs.setString('sessionId', jsonObject['data']['session_id']);
await prefs.setInt('table_mode', jsonObject['data']['table_mode']);
await prefs.setString('logoUrl', jsonObject['data']['image']);
await prefs.setString('logoUrl', jsonObject['data']['logo']);
//** save sessionID and Table Mode */
// return jsonObject['data']['name'];
......
......@@ -243,7 +243,9 @@ double heightTombol = 0.06; // untuk dikalikan di height media query
//**Height tombol */
//** kalkulasi pixel dihome */
double imageHeight = 96;
String logoUrl = prefs.getString("logoUrl") ?? "";
double imageHeight = (logoUrl != '') ? 96 : 0;
double heighScrollWithImage = 371 + imageHeight;
double heighScrollWithOutImage = 371;
//** */
......
......@@ -582,6 +582,7 @@ class _NewHome2State extends State<NewHome2> {
int tableMode,
bool isSearchActive,
) {
String logoUrl = prefs.getString("logoUrl") ?? "";
return Stack(
children: [
Container(
......@@ -621,27 +622,29 @@ class _NewHome2State extends State<NewHome2> {
controller: _scrollController,
slivers: [
SliverToBoxAdapter(
child: Container(
padding: const EdgeInsets.only(
top: 16,
),
child: Row(
children: [
const Spacer(),
Container(
width: 209,
height: 80,
child: const Image(
width: 209,
height: 80,
fit: BoxFit.fill,
image: AssetImage('assets/emoji/excelso.png'),
child: (logoUrl != '')
? Container(
padding: const EdgeInsets.only(
top: 16,
),
),
const Spacer(),
],
),
),
child: Row(
children: [
const Spacer(),
Container(
width: 209,
height: 80,
child: Image(
width: 209,
height: 80,
fit: BoxFit.fill,
image: NetworkImage(logoUrl),
),
),
const Spacer(),
],
),
)
: const SizedBox(),
),
SliverPersistentHeader(
pinned: true,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment