Skip to content

Commit 001b6be

Browse files
committed
v0.0.1
1 parent 5102202 commit 001b6be

File tree

11 files changed

+190
-82
lines changed

11 files changed

+190
-82
lines changed

.github/CODEOWNERS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Every request must be reviewed and accepted by:
2+
3+
* @skpraharaj
4+
* @divshekhar

.github/ISSUE_TEMPLATE/BUG_REPORT.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
5+
---
6+
7+
**Describe the bug**
8+
A clear and concise description of what the bug is.
9+
10+
**To Reproduce**
11+
Steps to reproduce the behavior:
12+
1. Go to '...'
13+
2. Click on '....'
14+
3. Scroll down to '....'
15+
4. See error
16+
17+
**Expected behavior**
18+
A clear and concise description of what you expected to happen.
19+
20+
**Screenshots**
21+
If applicable, add screenshots to help explain your problem.
22+
23+
**Logs **
24+
Run `flutter analyze` and attach any output of that command below.
25+
If there are any analysis errors, try resolving them before filing this issue.
26+
27+
Paste the output of running `flutter doctor -v` here.
28+
29+
**Additional context**
30+
Add any other context about the problem here.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
5+
---
6+
7+
**Is your feature request related to a problem? Please describe.**
8+
A clear and concise description of what the problem is.
9+
10+
**Describe the solution you'd like**
11+
A clear and concise description of what you want to happen.
12+
13+
**Describe alternatives you've considered**
14+
A clear and concise description of any alternative solutions or features you've considered.
15+
16+
**Additional context**
17+
Add any other context or screenshots about the feature request here.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<!--
2+
Thanks for contributing!
3+
4+
Provide a description of your changes below and a general summary in the title
5+
6+
Please look at the following checklist to ensure that your PR can be accepted quickly:
7+
-->
8+
9+
## Status
10+
11+
**READY/IN DEVELOPMENT/HOLD**
12+
13+
## Breaking Changes
14+
15+
YES | NO
16+
17+
## Description
18+
19+
<!--- Describe your changes in detail -->
20+
21+
## Type of Change
22+
23+
<!--- Put an `x` in all the boxes that apply: -->
24+
25+
- [ ] ✨ New feature (non-breaking change which adds functionality)
26+
- [ ] 🛠️ Bug fix (non-breaking change which fixes an issue)
27+
- [ ] ❌ Breaking change (fix or feature that would cause existing functionality to change)
28+
- [ ] 🧹 Code refactor
29+
- [ ] ✅ Build configuration change
30+
- [ ] 📝 Documentation
31+
- [ ] 🗑️ Chore

.github/workflows/ci.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v2
13+
# Setup the flutter environment.
14+
- uses: subosito/flutter-action@v2.3.0
15+
16+
- name: Install Dependencies
17+
run: flutter packages get
18+
19+
- name: Format
20+
run: flutter format --set-exit-if-changed lib
21+
22+
- name: Analyze
23+
run: flutter analyze --no-pub

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
## 0.0.1
22

3+
* Initial Release
34
* Fully functional bulletin widget.

LICENSE

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,27 @@
1-
TODO: Add your license here.
1+
BSD 3-Clause License
2+
3+
(c) Copyright 2022 DevsOnFlutter
4+
5+
Redistribution and use in source and binary forms, with or without modification,
6+
are permitted provided that the following conditions are met:
7+
8+
1. Redistributions of source code must retain the above copyright notice,
9+
this list of conditions and the following disclaimer.
10+
11+
2. Redistributions in binary form must reproduce the above copyright notice,
12+
this list of conditions and the following disclaimer in the documentation
13+
and/or other materials provided with the distribution.
14+
15+
3. Neither the name of the copyright holder nor the names of its contributors
16+
may be used to endorse or promote products derived from this software without
17+
specific prior written permission.
18+
19+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
21+
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
22+
THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
24+
OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25+
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
26+
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
27+
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

README.md

Lines changed: 37 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,14 @@ Flutter package to to show bulletins in your application.
66

77
## Show some :heart: and :star: the repo
88

9-
<!-- ## Demo -->
9+
|<img height=500 src="https://i.imgur.com/suiSFeN.png"/>|
1010

1111
## Features
1212

13-
TODO: List what your package can do. Maybe include images, gifs, or videos.
13+
✅ Show Flash Cards
14+
✅ Pop up cards
15+
✅ Animation flash cards
16+
✅ Fully Customizable
1417

1518
## Getting started
1619

@@ -20,46 +23,46 @@ Include plugin to your project
2023
dependencies:
2124
bulletin: <latest version>
2225
```
26+
2327
Run `pub get` and get packages.
2428

2529
## Example
30+
2631
Go to example section in pub.dev to see the full example code.
2732

2833
In GitHub, head over to `example/lib/main.dart` to see the full example code.
2934

30-
|<img height=500 src="https://i.imgur.com/suiSFeN.png"/>|
31-
3235
```dart
3336
Bulletin(
34-
icon: const Icon(
35-
Icons.mic_outlined,
36-
size: 20,
37-
),
38-
backgroundColor: const Color(0xffFFF3D0),
39-
children: [
40-
BulletinItem(
41-
text:
42-
"1. This is a bulletin.Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi eget elementum libero.",
43-
onTap: () {
44-
debugPrint("OnTap Function called for BulletinItem 1 ");
45-
},
46-
),
47-
BulletinItem(
48-
text:
49-
"2. This is a bulletin.Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi eget elementum libero.",
50-
onTap: () {
51-
debugPrint("OnTap Function called for BulletinItem 2 ");
52-
},
53-
),
54-
BulletinItem(
55-
text:
56-
"3. This is a bulletin.Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi eget elementum libero.",
57-
onTap: () {
58-
debugPrint("OnTap Function called for BulletinItem 3 ");
59-
},
60-
),
61-
],
62-
),
37+
icon: const Icon(
38+
Icons.mic_outlined,
39+
size: 20,
40+
),
41+
backgroundColor: const Color(0xffFFF3D0),
42+
children: [
43+
BulletinItem(
44+
text:
45+
"1. This is a bulletin.Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi eget elementum libero.",
46+
onTap: () {
47+
debugPrint("OnTap Function called for BulletinItem 1 ");
48+
},
49+
),
50+
BulletinItem(
51+
text:
52+
"2. This is a bulletin.Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi eget elementum libero.",
53+
onTap: () {
54+
debugPrint("OnTap Function called for BulletinItem 2 ");
55+
},
56+
),
57+
BulletinItem(
58+
text:
59+
"3. This is a bulletin.Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi eget elementum libero.",
60+
onTap: () {
61+
debugPrint("OnTap Function called for BulletinItem 3 ");
62+
},
63+
),
64+
],
65+
),
6366
```
6467

6568
## Project Created & Maintained By
@@ -100,5 +103,5 @@ For a custom-hook to be merged, you will need to do the following:
100103

101104
## Copyright & License
102105

103-
Code and documentation Copyright (c) 2021 [Divyanshu Shekhar](https://hackthedeveloper.com). Code released under the [BSD 3-Clause License](./LICENSE).
106+
Code and documentation Copyright (c) 2021 [DevsOnFlutter](https://github.com/DevsOnFlutter). Code released under the [BSD 3-Clause License](./LICENSE).
104107

lib/src/bulletin.dart

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import 'dart:async';
2+
import 'package:flutter/material.dart';
23

34
import 'package:bulletin/src/bulletin_item.dart';
4-
import 'package:flutter/material.dart';
55

66
class Bulletin extends StatefulWidget {
7+
/// Bulletin
78
const Bulletin({
89
Key? key,
910
this.children = const [],
@@ -74,9 +75,9 @@ class Bulletin extends StatefulWidget {
7475
}
7576

7677
class _BulletinState extends State<Bulletin> with TickerProviderStateMixin {
77-
late AnimationController _controller;
78-
late ValueNotifier<int> index;
79-
late ValueNotifier<bool> isClosed;
78+
late final AnimationController _controller;
79+
late final ValueNotifier<int> index;
80+
late final ValueNotifier<bool> isClosed;
8081

8182
@override
8283
void initState() {

lib/src/bulletin_item.dart

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,23 @@
11
import 'package:flutter/material.dart';
22

33
class BulletinItem {
4-
Widget? icon;
5-
String text;
6-
TextStyle? textStyle;
7-
VoidCallback? onTap;
4+
/// Icon of the bulletin
5+
final Widget? icon;
86

7+
/// Text of the bulletin
8+
final String text;
9+
10+
/// Text style of the bulletin
11+
final TextStyle? textStyle;
12+
13+
/// Function called onTap to bulletin
14+
final VoidCallback? onTap;
15+
16+
/// Bulletin Item
917
BulletinItem({
10-
this.icon,
1118
required this.text,
12-
this.textStyle,
1319
required this.onTap,
20+
this.icon,
21+
this.textStyle,
1422
});
1523
}

0 commit comments

Comments
 (0)