Skip to content

Commit

Permalink
File_Upload dart files added
Browse files Browse the repository at this point in the history
  • Loading branch information
gokulmanohar committed Dec 8, 2020
1 parent 034d5f9 commit 1efc7d7
Show file tree
Hide file tree
Showing 13 changed files with 343 additions and 28 deletions.
2 changes: 1 addition & 1 deletion .flutter-plugins-dependencies

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions .idea/dictionaries/gokul.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

61 changes: 41 additions & 20 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .packages
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by pub on 2020-12-03 16:58:47.880324.
# Generated by pub on 2020-12-08 19:51:07.044691.
archive:file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/archive-2.0.13/lib/
args:file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/args-1.6.0/lib/
async:file:///C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/async-2.4.2/lib/
Expand Down
Binary file modified android/.gradle/6.3/executionHistory/executionHistory.bin
Binary file not shown.
Binary file modified android/.gradle/6.3/executionHistory/executionHistory.lock
Binary file not shown.
Binary file modified android/.gradle/6.3/fileHashes/fileHashes.bin
Binary file not shown.
Binary file modified android/.gradle/6.3/fileHashes/fileHashes.lock
Binary file not shown.
Binary file modified android/.gradle/buildOutputCleanup/buildOutputCleanup.lock
Binary file not shown.
2 changes: 2 additions & 0 deletions lib/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ class NotedApp extends StatelessWidget {
debugShowCheckedModeBanner: false,
title: 'NOT.ED',
theme: ThemeData(
fontFamily: 'OpenSans',
brightness: Brightness.light,
appBarTheme: AppBarTheme(elevation: 1, color: Colors.black),
bottomNavigationBarTheme: BottomNavigationBarThemeData(backgroundColor: Colors.white, unselectedItemColor: Colors.black),
Expand All @@ -16,6 +17,7 @@ class NotedApp extends StatelessWidget {
accentColor: Colors.deepOrangeAccent,
),
darkTheme: ThemeData(
fontFamily: 'OpenSans',
brightness: Brightness.dark,
appBarTheme: AppBarTheme(elevation: 0.1, color: Colors.black),
bottomNavigationBarTheme: BottomNavigationBarThemeData(backgroundColor: Colors.grey[900], unselectedItemColor: Colors.white),
Expand Down
9 changes: 3 additions & 6 deletions lib/ui/landing/profile.dart
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
import 'package:flutter/material.dart';
import 'profile/about.dart';
import 'package:url_launcher/url_launcher.dart';

// import 'dart:async';
// import 'dart:io';
// import 'package:flutter_plugin_pdf_viewer/flutter_plugin_pdf_viewer.dart';
// import 'package:file_picker/file_picker.dart';
import 'profile/upload/upload_notes.dart';

class Profile extends StatelessWidget {
// ignore: non_constant_identifier_names
Expand Down Expand Up @@ -92,7 +88,8 @@ class Profile extends StatelessWidget {
InkWell(
highlightColor: Colors.transparent,
splashColor: Colors.transparent,
// onTap: ,
onTap: () => Navigator.push(context,
MaterialPageRoute(builder: (context) =>UploadNotes())),
child: Container(
margin: const EdgeInsets.only(top: 30.0, left: 25.0),
child: Row(
Expand Down
24 changes: 24 additions & 0 deletions lib/ui/landing/profile/upload/db_event.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:uuid/uuid.dart';


class EventService{
FirebaseFirestore _firestore = FirebaseFirestore.instance;
String ref = 'eUpload';


void uploadDetails({String id,String title,String details, String price,String image,String file,Timestamp publishedDate}){
var id =Uuid();
String pEventId = id.v1();
_firestore.collection(ref).doc(pEventId).set({
'title' : title,
'id' : pEventId,
'description' : details,
'price' : price,
'image' : image,
'publishedDate' : DateTime.now(),
'file' : file,
});

}
}
Loading

0 comments on commit 1efc7d7

Please sign in to comment.