Skip to content

Commit

Permalink
chore: organized code imports and exports
Browse files Browse the repository at this point in the history
  • Loading branch information
IamMuuo committed Sep 6, 2024
1 parent 1bc2de5 commit e2daca3
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 75 deletions.
15 changes: 5 additions & 10 deletions lib/exports/barrel.dart
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
export 'package:academia/tools/exam_timetable/exam_timetable.dart';
export 'package:flutter_pdfview/flutter_pdfview.dart';
export 'package:academia/widgets/info_card.dart';
export 'package:cached_network_image/cached_network_image.dart';
export 'package:academia/constants/tools.dart';
export 'package:academia/widgets/tool_card.dart';
export 'package:awesome_notifications/awesome_notifications.dart';
export 'package:academia/tools/todo/todo.dart';
export 'package:academia/tools/tools.dart';

// academia core pages
export '../pages/pages.dart';

Expand All @@ -16,6 +6,8 @@ export '../widgets/widgets.dart';

// Academia constants
export '../constants/common.dart';
export 'package:academia/constants/tools.dart';
export 'package:academia/tools/tools.dart';

// Academis controllers
export '../controllers/controllers.dart';
Expand All @@ -37,6 +29,9 @@ export 'package:flutter/services.dart';

// third party packages
export 'package:magnet/magnet.dart';
export 'package:awesome_notifications/awesome_notifications.dart';
export 'package:flutter_pdfview/flutter_pdfview.dart';
export 'package:cached_network_image/cached_network_image.dart';
export 'package:ionicons/ionicons.dart';
export 'package:percent_indicator/percent_indicator.dart';
export 'package:path_provider/path_provider.dart';
Expand Down
119 changes: 57 additions & 62 deletions lib/tools/chirp/widgets/empty_post_card.dart
Original file line number Diff line number Diff line change
@@ -1,73 +1,68 @@
import 'package:academia/exports/barrel.dart';
import 'package:flutter/material.dart';
import 'package:shimmer/shimmer.dart';

class EmptyPostCard extends StatelessWidget {
const EmptyPostCard({super.key});

@override
Widget build(BuildContext context) {
return Shimmer.fromColors(
baseColor: Colors.grey[300]!,
highlightColor: Colors.white,
child: Container(
width: MediaQuery.of(context).size.width,
padding: const EdgeInsets.symmetric(
horizontal: 10,
vertical: 8,
),
child: Column(
children: [
Row(
children: [
const CircleAvatar(
radius: 20,
),
const SizedBox(width: 4),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
color: Theme.of(context).colorScheme.primaryContainer,
height: 10,
width: 60,
),
const SizedBox(height: 2),
Container(
color: Theme.of(context).colorScheme.primaryContainer,
height: 10,
width: 120,
),
],
),
const Spacer(),
const CircleAvatar(radius: 10)
],
),
const SizedBox(height: 4),
Container(
color: Theme.of(context).colorScheme.primaryContainer,
height: 60,
width: double.infinity,
),
const SizedBox(height: 4),
Row(
children: [
Container(
color: Theme.of(context).colorScheme.primaryContainer,
height: 20,
width: 60,
),
const Spacer(),
Container(
color: Theme.of(context).colorScheme.primaryContainer,
height: 20,
width: 60,
),
],
),
],
),
return Container(
width: MediaQuery.of(context).size.width,
padding: const EdgeInsets.symmetric(
horizontal: 10,
vertical: 8,
),
child: Column(
children: [
Row(
children: [
const CircleAvatar(
radius: 20,
),
const SizedBox(width: 4),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
color: Theme.of(context).colorScheme.primaryContainer,
height: 10,
width: 60,
),
const SizedBox(height: 2),
Container(
color: Theme.of(context).colorScheme.primaryContainer,
height: 10,
width: 120,
),
],
),
const Spacer(),
const CircleAvatar(radius: 10)
],
),
const SizedBox(height: 4),
Container(
color: Theme.of(context).colorScheme.primaryContainer,
height: 60,
width: double.infinity,
),
const SizedBox(height: 4),
Row(
children: [
Container(
color: Theme.of(context).colorScheme.primaryContainer,
height: 20,
width: 60,
),
const Spacer(),
Container(
color: Theme.of(context).colorScheme.primaryContainer,
height: 20,
width: 60,
),
],
),
],
),
);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/tools/tools.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ export 'birthday/birthday.dart';
export 'chirp/chirp.dart';
export 'ask_me/ask_me.dart';
export 'exam_timetable/exam_timetable.dart';

export 'todo/todo.dart';
4 changes: 3 additions & 1 deletion lib/widgets/widgets.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
export 'package:academia/widgets/stat.dart';
export 'stat.dart';
export 'profile_picture.dart';
export 'school_id_card_widget.dart';
export 'info_card.dart';
export 'tool_card.dart';
1 change: 0 additions & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ dependencies:
workmanager: ^0.5.2
timeago: ^3.7.0
swipe_to: ^1.0.6
shimmer: ^3.0.0
file_picker: ^8.0.5


Expand Down

0 comments on commit e2daca3

Please sign in to comment.