This commit is contained in:
2024-06-23 18:56:22 -05:00
parent b860ae52f6
commit c65e225291
8 changed files with 75 additions and 26 deletions
+15 -4
View File
@@ -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,
),
),
+4 -3
View File
@@ -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) {
+7 -5
View File
@@ -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(
+44 -11
View File
@@ -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}',