Skip to content

Commit

Permalink
Fix documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
b13nxx committed Sep 29, 2021
1 parent 16bec2f commit df10f0f
Show file tree
Hide file tree
Showing 11 changed files with 41 additions and 18 deletions.
3 changes: 3 additions & 0 deletions lib/commons/box_decorations.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import 'package:flutter/material.dart';

/*
* These are generic methods, predefined to be able to used by whole app
*/
mixin BoxDecorations {
static BoxDecoration circle(Color backgroundColor, [double width = 1]) {
return BoxDecoration(
Expand Down
3 changes: 3 additions & 0 deletions lib/commons/text_styles.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import 'package:flutter/material.dart';

/*
* These are generic methods, predefined to be able to used by whole app
*/
mixin TextStyles {
static TextStyle weak() {
return TextStyle(
Expand Down
8 changes: 8 additions & 0 deletions lib/screens/speed_prototyping.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ import 'package:bstevr_assessment/widgets/custom_app_bar.dart';
import 'package:bstevr_assessment/widgets/custom_navigation_bar.dart';

class SpeedPrototyping extends StatelessWidget {
/*
* The props, meaning these are not gonna change
* during lifetime of the component
*/
final List<dynamic> quickActionsEntries;
final List<dynamic> favoriteScenesEntries;
final List<dynamic> favoriteAccessoriesEntries;
Expand All @@ -25,6 +29,10 @@ class SpeedPrototyping extends StatelessWidget {
bottomNavigationBarItems = getBottomNavigationBarItems(),
super(key: key);

/*
* The rendering method, in which the component tells
* how it should show itself
*/
@override
Widget build(BuildContext context) {
return Container(
Expand Down
5 changes: 4 additions & 1 deletion lib/utilities/custom_audio_player.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
/*
* These are the external dependencies
*/
import 'package:just_audio/just_audio.dart';

/*
* Singleton pattern is used for AudioPlayer instance,
* because we don't need instances more than one and
* we can access from anywhere across our application
* we can access from anywhere across our app
*/
class CustomAudioPlayer {
CustomAudioPlayer._privateConstructor();
Expand Down
3 changes: 3 additions & 0 deletions lib/utilities/helper_methods.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ import 'package:flutter/material.dart';
*/
import 'package:bstevr_assessment/models/icon_entry.dart';

/*
* These are helper logics potentially be used across whole project
*/
String getTimePassed(DateTime date) {
Duration difference = DateTime.now().difference(date);

Expand Down
12 changes: 6 additions & 6 deletions lib/widgets/circle_card.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'package:flutter/material.dart';

/*
* These are the internal dependencies for the widget below
* These are the internal dependencies
*/
import 'package:bstevr_assessment/commons/text_styles.dart';
import 'package:bstevr_assessment/commons/box_decorations.dart';
Expand Down Expand Up @@ -34,11 +34,6 @@ class CircleCard extends StatefulWidget {
}

class _CircleCardState extends State<CircleCard> {
/*
* The state, basically data that changes over time
*/
late bool _selected;

/*
* This is initializing logic
*/
Expand All @@ -48,6 +43,11 @@ class _CircleCardState extends State<CircleCard> {
super.initState();
}

/*
* The state, basically data that changes over time
*/
late bool _selected;

/*
* These are inner logics that will change the state of the component
*/
Expand Down
5 changes: 4 additions & 1 deletion lib/widgets/coin_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class _CoinCardState extends State<CoinCard> with TickerProviderStateMixin {
late Animation<Offset> _animation;

/*
* These are initializing and disposing logics
* These is initializing logic
*/
@override
void initState() {
Expand All @@ -63,6 +63,9 @@ class _CoinCardState extends State<CoinCard> with TickerProviderStateMixin {
));
}

/*
* These is disposing logic
*/
@override
void dispose() {
_timer.cancel();
Expand Down
2 changes: 1 addition & 1 deletion lib/widgets/loading_bar.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'package:flutter/material.dart';

/*
* These are the internal dependencies for the widget below
* These are the internal dependencies
*/
import 'package:bstevr_assessment/commons/text_styles.dart';

Expand Down
2 changes: 1 addition & 1 deletion lib/widgets/quick_actions.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'package:flutter/material.dart';

/*
* These are the internal dependencies for the widget below
* These are the internal dependencies
*/
import 'package:bstevr_assessment/widgets/circle_card.dart';

Expand Down
14 changes: 7 additions & 7 deletions lib/widgets/rectangle_card.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'package:flutter/material.dart';

/*
* These are the internal dependencies for the widget below
* These are the internal dependencies
*/
import 'package:bstevr_assessment/commons/text_styles.dart';
import 'package:bstevr_assessment/commons/box_decorations.dart';
Expand Down Expand Up @@ -38,11 +38,6 @@ class RectangleCard extends StatefulWidget {
}

class _RectangleCardState extends State<RectangleCard> {
/*
* The state, basically data that changes over time
*/
late bool _selected;

/*
* This is initializing logic
*/
Expand All @@ -53,7 +48,12 @@ class _RectangleCardState extends State<RectangleCard> {
}

/*
* These are inner logic that will change the state of the component
* The state, basically data that changes over time
*/
late bool _selected;

/*
* These are inner logics that will change the state of the component
*/
void _toggleButton() {
setState(() {
Expand Down
2 changes: 1 addition & 1 deletion lib/widgets/selectable_cards.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'package:flutter/material.dart';

/*
* These are the internal dependencies for the widget below
* These are the internal dependencies
*/
import 'package:bstevr_assessment/widgets/rectangle_card.dart';

Expand Down

0 comments on commit df10f0f

Please sign in to comment.