fixes
This commit is contained in:
parent
b860ae52f6
commit
c65e225291
@ -264,7 +264,6 @@ void main() async {
|
||||
}
|
||||
}
|
||||
|
||||
// await Future.delayed(Duration(seconds: 5));
|
||||
return Response.ok(
|
||||
json.encode(output),
|
||||
headers: {
|
||||
|
||||
@ -75,6 +75,7 @@ class _MainAppState extends State<MainApp> {
|
||||
primary: Colors.blue.shade700,
|
||||
onPrimary: Colors.white,
|
||||
secondary: Colors.blue.shade900,
|
||||
onSecondary: Colors.white,
|
||||
surface: const Color.fromARGB(255, 31, 31, 31),
|
||||
surfaceContainer: const Color.fromARGB(255, 46, 46, 46),
|
||||
tertiary: Colors.green.shade900,
|
||||
@ -100,6 +101,7 @@ class _MainAppState extends State<MainApp> {
|
||||
primary: Colors.blue.shade700,
|
||||
onPrimary: Colors.white,
|
||||
secondary: Colors.blue.shade300,
|
||||
onSecondary: Colors.black,
|
||||
surface: Colors.grey.shade100,
|
||||
surfaceContainer: Colors.grey.shade200,
|
||||
tertiary: Colors.green,
|
||||
|
||||
@ -228,10 +228,21 @@ class _BusinessesOverviewState extends State<BusinessesOverview> {
|
||||
List<Widget> chips = [];
|
||||
for (var type in BusinessType.values) {
|
||||
chips.add(FilterChip(
|
||||
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
|
||||
showCheckmark: false,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(20)),
|
||||
label: Text(getNameFromBusinessType(type)),
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
side: BorderSide(
|
||||
color:
|
||||
Theme.of(context).colorScheme.secondary)),
|
||||
selectedColor: Theme.of(context).colorScheme.secondary,
|
||||
label: Text(
|
||||
getNameFromBusinessType(type),
|
||||
style: TextStyle(
|
||||
color: selectedChips.contains(type)
|
||||
? Theme.of(context).colorScheme.onSecondary
|
||||
: Theme.of(context).colorScheme.onSurface),
|
||||
),
|
||||
selected: selectedChips.contains(type),
|
||||
onSelected: (bool selected) {
|
||||
if (selected) {
|
||||
@ -248,8 +259,8 @@ class _BusinessesOverviewState extends State<BusinessesOverview> {
|
||||
content: SizedBox(
|
||||
width: 400,
|
||||
child: Wrap(
|
||||
spacing: 6,
|
||||
runSpacing: 6,
|
||||
spacing: 8,
|
||||
runSpacing: 8,
|
||||
children: chips,
|
||||
),
|
||||
),
|
||||
|
||||
@ -93,8 +93,9 @@ class _CreateEditBusinessState extends State<CreateEditBusiness> {
|
||||
? FloatingActionButton.extended(
|
||||
label: const Text('Save'),
|
||||
icon: _isLoading
|
||||
? const Padding(
|
||||
padding: EdgeInsets.all(16.0),
|
||||
? const SizedBox(
|
||||
width: 24,
|
||||
height: 24,
|
||||
child: CircularProgressIndicator(
|
||||
color: Colors.white,
|
||||
strokeWidth: 3.0,
|
||||
@ -126,7 +127,7 @@ class _CreateEditBusinessState extends State<CreateEditBusiness> {
|
||||
leading: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(6.0),
|
||||
child: Image.network(
|
||||
'$apiAddress/logos/${business.id}',
|
||||
'https://logo.clearbit.com/${business.website}',
|
||||
width: 48,
|
||||
height: 48, errorBuilder: (BuildContext context,
|
||||
Object exception, StackTrace? stackTrace) {
|
||||
|
||||
@ -82,8 +82,9 @@ class _CreateEditJobListingState extends State<CreateEditJobListing> {
|
||||
? FloatingActionButton.extended(
|
||||
label: const Text('Save'),
|
||||
icon: _isLoading
|
||||
? const Padding(
|
||||
padding: EdgeInsets.all(16.0),
|
||||
? const SizedBox(
|
||||
width: 24,
|
||||
height: 24,
|
||||
child: CircularProgressIndicator(
|
||||
color: Colors.white,
|
||||
strokeWidth: 3.0,
|
||||
@ -146,7 +147,8 @@ class _CreateEditJobListingState extends State<CreateEditJobListing> {
|
||||
CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
getNameFromJobType(listing.type!),
|
||||
getNameFromJobType(
|
||||
listing.type ?? JobType.other),
|
||||
style: const TextStyle(fontSize: 18),
|
||||
),
|
||||
Text(
|
||||
@ -154,8 +156,8 @@ class _CreateEditJobListingState extends State<CreateEditJobListing> {
|
||||
),
|
||||
],
|
||||
),
|
||||
contentPadding: const EdgeInsets.only(
|
||||
bottom: 8, left: 16),
|
||||
contentPadding:
|
||||
const EdgeInsets.only(left: 16),
|
||||
leading: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(6.0),
|
||||
child: Image.network(
|
||||
|
||||
@ -245,10 +245,21 @@ class _JobsOverviewState extends State<JobsOverview> {
|
||||
List<Widget> jobTypeChips = [];
|
||||
for (JobType type in JobType.values) {
|
||||
jobTypeChips.add(FilterChip(
|
||||
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
|
||||
showCheckmark: false,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(20)),
|
||||
label: Text(getNameFromJobType(type)),
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
side: BorderSide(
|
||||
color:
|
||||
Theme.of(context).colorScheme.secondary)),
|
||||
selectedColor: Theme.of(context).colorScheme.secondary,
|
||||
label: Text(
|
||||
getNameFromJobType(type),
|
||||
style: TextStyle(
|
||||
color: selectedJobTypeChips.contains(type)
|
||||
? Theme.of(context).colorScheme.onSecondary
|
||||
: Theme.of(context).colorScheme.onSurface),
|
||||
),
|
||||
selected: selectedJobTypeChips.contains(type),
|
||||
onSelected: (bool selected) {
|
||||
if (selected) {
|
||||
@ -263,10 +274,21 @@ class _JobsOverviewState extends State<JobsOverview> {
|
||||
List<Widget> offerTypeChips = [];
|
||||
for (OfferType type in OfferType.values) {
|
||||
offerTypeChips.add(FilterChip(
|
||||
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
|
||||
showCheckmark: false,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(20)),
|
||||
label: Text(getNameFromOfferType(type)),
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
side: BorderSide(
|
||||
color:
|
||||
Theme.of(context).colorScheme.secondary)),
|
||||
selectedColor: Theme.of(context).colorScheme.secondary,
|
||||
label: Text(
|
||||
getNameFromOfferType(type),
|
||||
style: TextStyle(
|
||||
color: selectedOfferTypeChips.contains(type)
|
||||
? Theme.of(context).colorScheme.onSecondary
|
||||
: Theme.of(context).colorScheme.onSurface),
|
||||
),
|
||||
selected: selectedOfferTypeChips.contains(type),
|
||||
onSelected: (bool selected) {
|
||||
if (selected) {
|
||||
@ -283,14 +305,15 @@ class _JobsOverviewState extends State<JobsOverview> {
|
||||
content: SizedBox(
|
||||
width: 400,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
const Text('Job Type Filters:'),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 8.0),
|
||||
child: Wrap(
|
||||
spacing: 6,
|
||||
runSpacing: 6,
|
||||
spacing: 8,
|
||||
runSpacing: 8,
|
||||
children: jobTypeChips,
|
||||
),
|
||||
),
|
||||
@ -298,8 +321,8 @@ class _JobsOverviewState extends State<JobsOverview> {
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 8.0),
|
||||
child: Wrap(
|
||||
spacing: 6,
|
||||
runSpacing: 6,
|
||||
spacing: 8,
|
||||
runSpacing: 8,
|
||||
children: offerTypeChips,
|
||||
),
|
||||
),
|
||||
@ -512,7 +535,11 @@ class _JobHeaderState extends State<_JobHeader> {
|
||||
style: const TextStyle(fontSize: 16),
|
||||
),
|
||||
largeSize: 26,
|
||||
offset: const Offset(15, -5),
|
||||
padding: business.listings![0].offerType! ==
|
||||
OfferType.internship
|
||||
? const EdgeInsets.symmetric(horizontal: 5)
|
||||
: null,
|
||||
offset: const Offset(13, -2),
|
||||
textColor: Colors.white,
|
||||
backgroundColor: getColorFromOfferType(
|
||||
business.listings![0].offerType!),
|
||||
@ -629,9 +656,15 @@ class _JobHeaderState extends State<_JobHeader> {
|
||||
child: ListTile(
|
||||
leading: Badge(
|
||||
label: Text(getLetterFromOfferType(business.listings![0].offerType!)),
|
||||
textColor: Theme.of(context).colorScheme.onPrimary,
|
||||
textColor: Colors.white,
|
||||
isLabelVisible: true,
|
||||
backgroundColor: Theme.of(context).colorScheme.primary,
|
||||
offset: const Offset(7, -5),
|
||||
alignment: Alignment.topRight,
|
||||
padding: business.listings![0].offerType! == OfferType.internship
|
||||
? const EdgeInsets.symmetric(horizontal: 5)
|
||||
: null,
|
||||
backgroundColor:
|
||||
getColorFromOfferType(business.listings![0].offerType!),
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(3.0),
|
||||
child: Image.network('$apiAddress/logos/${business.id}',
|
||||
|
||||
@ -6,8 +6,8 @@ import 'package:fbla_ui/shared/global_vars.dart';
|
||||
import 'package:fbla_ui/shared/utils.dart';
|
||||
import 'package:http/http.dart' as http;
|
||||
|
||||
var apiAddress = 'https://homelab.marinodev.com/fbla-api';
|
||||
// var apiAddress = 'http://192.168.0.114:8000/fbla-api';
|
||||
// var apiAddress = 'https://homelab.marinodev.com/fbla-api';
|
||||
var apiAddress = 'http://192.168.0.114:8000/fbla-api';
|
||||
|
||||
var client = http.Client();
|
||||
|
||||
|
||||
@ -133,6 +133,7 @@ class _FilterJobDataTypeChipsState extends State<_FilterJobDataTypeChips> {
|
||||
padding:
|
||||
const EdgeInsets.only(left: 3.0, right: 3.0, bottom: 3.0, top: 3.0),
|
||||
child: FilterChip(
|
||||
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
side:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user