Skip to content

Commit

Permalink
added uplaod image functionality in community create overlay
Browse files Browse the repository at this point in the history
  • Loading branch information
gitgudGR7 committed Apr 17, 2022
1 parent 0564828 commit 385ba86
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 4 deletions.
1 change: 0 additions & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import 'package:insync/view/profile/edit_profile.dart';
import 'package:insync/view/splash.dart';
import 'dart:async';
import 'package:stacked_themes/stacked_themes.dart';
import 'package:dio/dio.dart';

Future main() async {
await ThemeManager.initialise();
Expand Down
6 changes: 5 additions & 1 deletion lib/view/community/create_community_overlay.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import 'package:flutter_feather_icons/flutter_feather_icons.dart';
import 'package:insync/widgets/button.dart';
import 'package:insync/widgets/input_field.dart';
import 'package:multi_select_flutter/multi_select_flutter.dart';
import 'package:image_picker/image_picker.dart';

class Intrest {
final int? id;
Expand Down Expand Up @@ -109,7 +110,10 @@ class _CreateCommunityOverlayState extends State<CreateCommunityOverlay> {
PrimaryButton(
buttonTitle: "Upload community image",
iconLeft: const Icon(FeatherIcons.uploadCloud),
onPressed: () {},
onPressed: () async {
PickedFile? pickedFile =
await ImagePicker().getImage(source: ImageSource.gallery);
},
textColor: const Color(0xff2561ED),
bgColor: Theme.of(context).scaffoldBackgroundColor,
border: const BorderSide(color: Color(0xff2561ED), width: 2),
Expand Down
4 changes: 2 additions & 2 deletions lib/view/forum/forum_detail.dart
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ class _ForumDetailPageState extends State<ForumDetailPage> {
),
),
GestureDetector(
onTap: () {
var message = messagectr.text;
onTap: (){
var message= messagectr.text;
},
child: CircleAvatar(
radius: 24,
Expand Down
56 changes: 56 additions & 0 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.15.0"
cross_file:
dependency: transitive
description:
name: cross_file
url: "https://pub.dartlang.org"
source: hosted
version: "0.3.2"
crypto:
dependency: transitive
description:
Expand Down Expand Up @@ -125,6 +132,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.4"
flutter_plugin_android_lifecycle:
dependency: transitive
description:
name: flutter_plugin_android_lifecycle
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.5"
flutter_secure_storage:
dependency: "direct main"
description:
Expand Down Expand Up @@ -191,6 +205,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "7.2.0"
http:
dependency: transitive
description:
name: http
url: "https://pub.dartlang.org"
source: hosted
version: "0.13.4"
http_parser:
dependency: transitive
description:
Expand All @@ -205,6 +226,41 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "3.1.3"
image_picker:
dependency: "direct main"
description:
name: image_picker
url: "https://pub.dartlang.org"
source: hosted
version: "0.8.5"
image_picker_android:
dependency: transitive
description:
name: image_picker_android
url: "https://pub.dartlang.org"
source: hosted
version: "0.8.4+11"
image_picker_for_web:
dependency: transitive
description:
name: image_picker_for_web
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.6"
image_picker_ios:
dependency: transitive
description:
name: image_picker_ios
url: "https://pub.dartlang.org"
source: hosted
version: "0.8.4+11"
image_picker_platform_interface:
dependency: transitive
description:
name: image_picker_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "2.4.4"
js:
dependency: transitive
description:
Expand Down
1 change: 1 addition & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ dependencies:
tcard: ^1.3.5 # Tinder swipecards
dio: ^4.0.6
flutter_secure_storage: ^5.0.2
image_picker: ^0.8.5



Expand Down

0 comments on commit 385ba86

Please sign in to comment.