Skip to content

Commit

Permalink
task: store details whatsapp addon
Browse files Browse the repository at this point in the history
  • Loading branch information
Atuoha committed Oct 10, 2022
1 parent eeab18b commit 040d2e3
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 6 deletions.
36 changes: 30 additions & 6 deletions lib/views/main/store/store_details.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';

import '../../../constants/colors.dart';
import '../../../utilities/products_stream_builder.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';

class StoreDetails extends StatefulWidget {
const StoreDetails({
Expand All @@ -24,13 +24,20 @@ class _StoreDetailsState extends State<StoreDetails> {
}
}

void sendMail(){
void sendMail() {
// TODO: Implement sendMail
if (kDebugMode) {
print(widget.store['email']);
}
}

void sendWhatsappMsg() {
// TODO: Implement sendWhatsappMsg
if (kDebugMode) {
print('sendWhatsappMsg');
}
}

@override
Widget build(BuildContext context) {
var store = widget.store;
Expand All @@ -49,10 +56,27 @@ class _StoreDetailsState extends State<StoreDetails> {
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
const Text(
'Contact us',
style: TextStyle(
fontWeight: FontWeight.bold,
Directionality(
textDirection: TextDirection.rtl,
child: ElevatedButton.icon(
style: ElevatedButton.styleFrom(
primary: primaryColor,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10),
),
),
onPressed: () => sendWhatsappMsg(),
icon: const FaIcon(
FontAwesomeIcons.whatsapp,
color: Colors.white,
),
label: const Text(
'Whatsapp',
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold,
),
),
),
),
Directionality(
Expand Down
7 changes: 7 additions & 0 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,13 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
font_awesome_flutter:
dependency: "direct main"
description:
name: font_awesome_flutter
url: "https://pub.dartlang.org"
source: hosted
version: "10.2.1"
google_sign_in:
dependency: "direct main"
description:
Expand Down
1 change: 1 addition & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ dependencies:
photo_view: ^0.14.0
badges: ^2.0.3
floating_action_bubble: ^1.1.4
font_awesome_flutter: ^10.2.1

dev_dependencies:
flutter_test:
Expand Down
Binary file added screenshots/New folder/product_adj.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshots/New folder/store_adj.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 040d2e3

Please sign in to comment.