Skip to content

Commit

Permalink
Merge pull request #99 from just-ary27/companyScreens
Browse files Browse the repository at this point in the history
Fix Issues #15 #48 #51 #53 [GSoC'22]
  • Loading branch information
fredfalcon committed Jul 16, 2022
2 parents 719094d + 7828fbd commit 2a47862
Show file tree
Hide file tree
Showing 63 changed files with 4,209 additions and 2,972 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-flutter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
java-version: '12.x'
- uses: subosito/flutter-action@v1
with:
flutter-version: '2.10.0'
flutter-version: '2.10.4'
- run: flutter pub get
- run: flutter analyze
- run: flutter build apk
17 changes: 17 additions & 0 deletions assets/privacy_policy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Privacy Policy

We want to make sure you, as a Customer or Finder, understand what information we collect from you and why. We also want you to know about our information use practices so that you can make good decisions about how you use Bugheist.

This Privacy Policy explains what information we collect from and about you, (collectively, "Your Information") and what we do with it.

_Please read this Privacy Policy carefully._

## Information Collection
- __Direct Collection__
- When you create an account with Bugheist, you are required to provide us with profile information, including your name, company name (if applicable), username, password, and email address. Bugheist stores this information to help identify you when you log in.

- __Indirect Collection__
- We receive some information automatically when you visit Bugheist. This includes information about the device, browser, and operating system you use when accessing our site and Services and your IP address. If you visit Bugheist when you are logged into your account, we also collect the user identification number we assign you when you open your account.

- __Cookie Policy__
- When you log in to your account, Bugheist will place cookie(s) for the purpose of creating the session, knowing when you're logged in, and recognizing you as the same authenticated user across accounts. These cookie(s) contain an encrypted user identifier.
97 changes: 97 additions & 0 deletions lib/app.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
import 'dart:async';

import 'package:bugheist/pages/welcome.dart';
import 'package:bugheist/routes/routing.dart';
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:receive_sharing_intent/receive_sharing_intent.dart';

class BugHeist extends StatefulWidget {
const BugHeist({Key? key}) : super(key: key);

@override
BugHeistState createState() => BugHeistState();
}

class BugHeistState extends State<BugHeist> {
late StreamSubscription _intentDataStreamSubscription;
late List<SharedMediaFile> _sharedFiles;
//late String _sharedText;
final _messangerKey = GlobalKey<ScaffoldMessengerState>();
@override
void initState() {
super.initState();
// For sharing images coming from outside the app while the app is in the memory
_intentDataStreamSubscription = ReceiveSharingIntent.getMediaStream()
.listen((List<SharedMediaFile> value) {
setState(() {
print(_sharedFiles);
_sharedFiles = value;
});
}, onError: (err) {
print("getIntentDataStream error: $err");
});

// For sharing images coming from outside the app while the app is closed
ReceiveSharingIntent.getInitialMedia().then((List<SharedMediaFile> value) {
setState(() {
_sharedFiles = value;
});
});

// For sharing or opening urls/text coming from outside the app while the app is in the memory
_intentDataStreamSubscription =
ReceiveSharingIntent.getTextStream().listen((String value) {
setState(() {
print('detected a link here 1');
print(value);
//_sharedText = value;
});
}, onError: (err) {
print("getLinkStream error: $err");
});

// For sharing or opening urls/text coming from outside the app while the app is closed
ReceiveSharingIntent.getInitialText().then((value) {
setState(() {
print('detected text here:');
print(value);
//_sharedText = value;
});
});
}

@override
void dispose() {
_intentDataStreamSubscription.cancel();
super.dispose();
}

@override
Widget build(BuildContext context) {
return ProviderScope(
child: MaterialApp(
scaffoldMessengerKey: _messangerKey,
debugShowCheckedModeBanner: false,
onGenerateRoute: RouteManager.generateRoute,
title: 'BugHeist',
theme: ThemeData(
primarySwatch: Colors.red,
primaryColor: Colors.white,
visualDensity: VisualDensity.adaptivePlatformDensity,
primaryTextTheme: TextTheme(
headline1: TextStyle(
fontSize: 72.0,
fontWeight: FontWeight.bold,
color: Colors.black),
headline6: TextStyle(color: Colors.black),
button: TextStyle(
color: Colors.black,
),
),
),
home: WelcomePage(),
),
);
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'package:bugheist/components/searchbar.dart';
import 'package:bugheist/routes/routing.dart';
import 'package:flutter/material.dart';

Expand All @@ -14,6 +15,10 @@ AppBar buildAppBar({required BuildContext context}) {
Icons.search,
),
onPressed: () {
showSearch(
context: context,
delegate: BugHeistSearchDelegate(),
);
// do something
},
),
Expand All @@ -28,7 +33,7 @@ AppBar buildAppBar({required BuildContext context}) {
)
],
elevation: 0,
backgroundColor: Colors.transparent,
backgroundColor: Theme.of(context).canvasColor,
iconTheme: IconThemeData(color: Color(0xFFDC4654)),
);
}
109 changes: 109 additions & 0 deletions lib/components/issue_intro_card.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
import 'package:bugheist/routes/routing.dart';
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';

import '../models/issue_model.dart';

class IssueCard extends StatelessWidget {
final Issue issue;

const IssueCard({Key? key, required this.issue}) : super(key: key);

@override
Widget build(BuildContext context) {
final Size size = MediaQuery.of(context).size;
return Card(
margin: EdgeInsets.all(10),
elevation: 0,
clipBehavior: Clip.antiAlias,
color: Color(0xFF737373).withOpacity(0.15),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10),
),
child: InkWell(
onTap: () {
Navigator.pushNamed(
context,
RouteManager.issueDetailPage,
arguments: issue,
);
},
child: Container(
height: 0.334 * size.height,
child: Column(
children: <Widget>[
Container(
width: size.width,
height: 0.2 * size.height,
child: DecoratedBox(
decoration: BoxDecoration(
image: DecorationImage(
image: NetworkImage(issue.screenshotLink),
fit: BoxFit.cover,
),
),
),
),
Container(
width: size.width,
padding: const EdgeInsets.symmetric(horizontal: 12),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
padding: const EdgeInsets.only(top: 12),
child: Text(
"Issue #${issue.id}",
overflow: TextOverflow.ellipsis,
softWrap: true,
style: GoogleFonts.ubuntu(
textStyle: TextStyle(
color: Color(0xFFDC4654),
fontSize: 17.5,
),
fontWeight: FontWeight.bold,
),
),
),
Container(
padding: const EdgeInsets.only(top: 8, bottom: 12),
child: Text(
issue.description.replaceAll("\n", " "),
overflow: TextOverflow.ellipsis,
softWrap: true,
style: GoogleFonts.aBeeZee(
textStyle: TextStyle(
fontSize: 12,
color: Color(0xFF737373),
),
),
),
),
Row(
children: [
Container(
padding: const EdgeInsets.only(bottom: 12),
child: Text(
issue.created_date,
overflow: TextOverflow.ellipsis,
softWrap: true,
style: GoogleFonts.aBeeZee(
textStyle: TextStyle(
fontSize: 10,
color: Color(0xFFA3A3A3),
),
),
),
),
],
),
],
),
)
],
),
),
),
);
}
}
27 changes: 27 additions & 0 deletions lib/components/issuechip.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';

import '../models/issue_model.dart';

class IssueStatusChip extends StatelessWidget {
final Issue issue;
const IssueStatusChip({
Key? key,
required this.issue,
}) : super(key: key);

@override
Widget build(BuildContext context) {
return Chip(
label: Text(
(issue.isOpen) ? "Open" : "Closed",
style: GoogleFonts.aBeeZee(
textStyle: TextStyle(
fontSize: 10,
color: (issue.isOpen) ? Color(0xFFA3A3A3) : Color(0xFFDC4654),
),
),
),
);
}
}
93 changes: 93 additions & 0 deletions lib/components/searchbar.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
import 'package:bugheist/components/issue_intro_card.dart';
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';

import '../models/issuedata_model.dart';
import '../util/api/issues_api.dart';

class BugHeistSearchDelegate extends SearchDelegate {
@override
List<Widget>? buildActions(BuildContext context) {
return [
IconButton(
onPressed: () {
query = '';
},
icon: Icon(
Icons.clear,
color: Color(0xFFDC4654),
),
),
];
}

@override
Widget? buildLeading(BuildContext context) {
return IconButton(
icon: Icon(
Icons.arrow_back_ios_new_rounded,
color: Color(0xFFDC4654),
),
onPressed: () {
Navigator.of(context).pop();
},
);
}

@override
Widget buildResults(BuildContext context) {
Future _getObj = IssueApiClient.searchIssueByKeyWord(query);

ScrollController _scrollController = new ScrollController();

return FutureBuilder(
future: _getObj,
builder: (context, snapshot) {
if (snapshot.connectionState == ConnectionState.done) {
if (snapshot.hasError) {
return Center(
child: Text(
'Something went wrong!',
style: TextStyle(fontSize: 18),
),
);
} else if (snapshot.hasData) {
return ListView.builder(
padding: EdgeInsets.symmetric(horizontal: 20),
itemCount: (snapshot.data! as IssueData).issueList!.length,
controller: _scrollController,
itemBuilder: (context, index) {
return IssueCard(
issue: (snapshot.data! as IssueData).issueList![index],
);
},
);
}
}
return Center(
child: CircularProgressIndicator(),
);
},
);
}

@override
Widget buildSuggestions(BuildContext context) {
final Size size = MediaQuery.of(context).size;
return Container(
width: size.width,
height: size.height,
child: Center(
child: Text(
'Search an issue!',
style: GoogleFonts.ubuntu(
textStyle: TextStyle(
color: Color(0xFF737373),
fontSize: 20,
),
),
),
),
);
}
}
Loading

0 comments on commit 2a47862

Please sign in to comment.