Skip to content

Commit ca5d27b

Browse files
Merge pull request #9 from harshyadavDeveloper/main
Latest Code
2 parents 75701e5 + 64d9764 commit ca5d27b

23 files changed

Lines changed: 2004 additions & 371 deletions
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Flutter Compatibility
2+
3+
on:
4+
schedule:
5+
- cron: '0 14 * * 1'
6+
workflow_dispatch:
7+
8+
jobs:
9+
compatibility:
10+
name: Test on Flutter ${{ matrix.channel }}
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
channel:
17+
- stable
18+
- beta
19+
20+
steps:
21+
- name: Checkout code
22+
uses: actions/checkout@v4
23+
24+
- name: Setup Flutter
25+
uses: subosito/flutter-action@v2
26+
with:
27+
channel: ${{ matrix.channel }}
28+
29+
- name: Show Flutter version
30+
run: flutter --version
31+
32+
- name: Install dependencies
33+
run: flutter pub get
34+
35+
- name: Analyze
36+
run: flutter analyze
37+
38+
- name: Run tests
39+
run: flutter test
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Weekly Analyze
2+
3+
on:
4+
schedule:
5+
- cron: '0 10 * * 1'
6+
workflow_dispatch:
7+
8+
jobs:
9+
analyze:
10+
name: Analyze package
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
17+
- name: Setup Flutter
18+
uses: subosito/flutter-action@v2
19+
with:
20+
channel: 'stable'
21+
22+
- name: Install dependencies
23+
run: flutter pub get
24+
25+
- name: Run Flutter analyze
26+
run: flutter analyze

.github/workflows/weekly-pana.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Weekly Pana Score
2+
3+
on:
4+
schedule:
5+
- cron: '0 12 * * 1'
6+
workflow_dispatch:
7+
8+
jobs:
9+
pana:
10+
name: Check pub.dev score
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
17+
- name: Setup Flutter
18+
uses: subosito/flutter-action@v2
19+
with:
20+
channel: 'stable'
21+
22+
- name: Install dependencies
23+
run: flutter pub get
24+
25+
- name: Install pana
26+
run: dart pub global activate pana
27+
28+
- name: Run pana score check
29+
run: dart pub global run pana --no-warning .
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Weekly Publish Check
2+
3+
on:
4+
schedule:
5+
- cron: '0 11 * * 1'
6+
workflow_dispatch:
7+
8+
jobs:
9+
publish-check:
10+
name: Check package publishing
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
17+
- name: Setup Flutter
18+
uses: subosito/flutter-action@v2
19+
with:
20+
channel: 'stable'
21+
22+
- name: Install dependencies
23+
run: flutter pub get
24+
25+
- name: Run publish dry run
26+
run: dart pub publish --dry-run
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Weekly Security Check
2+
3+
on:
4+
schedule:
5+
- cron: '0 13 * * 1'
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
security:
13+
name: Check dependencies
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
20+
- name: Setup Flutter
21+
uses: subosito/flutter-action@v2
22+
with:
23+
channel: 'stable'
24+
25+
- name: Install dependencies
26+
run: flutter pub get
27+
28+
- name: Check dependency versions
29+
run: flutter pub outdated

.github/workflows/weekly-tests.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Weekly Tests
2+
3+
on:
4+
schedule:
5+
- cron: '0 9 * * 1'
6+
workflow_dispatch:
7+
8+
jobs:
9+
test:
10+
name: Run package tests
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
17+
- name: Setup Flutter
18+
uses: subosito/flutter-action@v2
19+
with:
20+
channel: 'stable'
21+
22+
- name: Install dependencies
23+
run: flutter pub get
24+
25+
- name: Run tests
26+
run: flutter test

CHANGELOG.md

Lines changed: 56 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,63 @@
1-
## 2.3.0
2-
3-
* Added `showWeekNumbers` to `SmartCalendar`
4-
* Added time picker to `SmartDateField`
5-
* `enableTimePicker` — show time picker icon
6-
* `initialTime` — initial TimeOfDay value
7-
* `onTimeChanged` — callback when time changes
8-
* `use24HourFormat` — 12h or 24h display
9-
* Combined date + time display in field
10-
* Time shown in selected info section
11-
* Added `SmartDateRangePicker` widget
12-
* Visual range selection with highlight
13-
* Preset ranges: today, thisWeek, thisMonth,
1+
## 2.5.0
2+
3+
- Added `themeMode` to SmartCalendar — light/dark/system
4+
- Added `cellBuilder` to SmartCalendar — custom cell widget
5+
- Added custom colors to SmartDateRangePicker:
6+
- `rangeHighlightColor`
7+
- `disabledColor`
8+
- `weekendColor`
9+
- `backgroundColor`
10+
- `textColor`
11+
- `cellBorderRadius`
12+
- `highlightWeekends`
13+
- Added 30+ edge case tests
14+
- Improved dartdoc coverage
15+
- Tuned analysis_options.yaml
16+
17+
## 2.4.0
18+
19+
- Added `showWeekNumbers` to `SmartCalendar`
20+
- Added time picker to `SmartDateField`
21+
- `enableTimePicker` — show time picker icon
22+
- `initialTime` — initial TimeOfDay value
23+
- `onTimeChanged` — callback when time changes
24+
- `use24HourFormat` — 12h or 24h display
25+
- Combined date + time display in field
26+
- Time shown in selected info section
27+
- Added `SmartDateRangePicker` widget
28+
- Visual range selection with highlight
29+
- Preset ranges: today, thisWeek, thisMonth,
1430
last7Days, last30Days, thisYear + more
15-
* Min/Max date constraints
16-
* `onRangeSelected` callback
17-
* `onCleared` callback
18-
* `showAsBottomSheet()` — dialog mode
19-
* Custom preset labels support
20-
* Configurable primary + range colors
21-
* Added `SmartDateRangePickerController`
22-
* `setRange(start, end)`
23-
* `setPreset(DateRangePreset)`
24-
* `clear()`
25-
* `value`, `hasValue`
26-
* Added `SelectedDateRange` model
27-
* `days` — range length
28-
* `contains(date)` — check if date in range
29-
* `toDateRange()` — convert to DateRange
30-
* Added `DateRangePreset` enum
31+
- Min/Max date constraints
32+
- `onRangeSelected` callback
33+
- `onCleared` callback
34+
- `showAsBottomSheet()` — dialog mode
35+
- Custom preset labels support
36+
- Configurable primary + range colors
37+
- Added `SmartDateRangePickerController`
38+
- `setRange(start, end)`
39+
- `setPreset(DateRangePreset)`
40+
- `clear()`
41+
- `value`, `hasValue`
42+
- Added `SelectedDateRange` model
43+
- `days` — range length
44+
- `contains(date)` — check if date in range
45+
- `toDateRange()` — convert to DateRange
46+
- Added `DateRangePreset` enum
3147

3248
## 2.2.0
3349

34-
* Added `SmartDateField` — smart Flutter form field for date input
35-
* Natural language input — type "tomorrow", "next monday"
36-
* Smart autocomplete suggestions
37-
* Date picker dialog integration
38-
* Min/Max date constraints
39-
* Built-in validation support
40-
* Clear button
41-
* Selected date display with timeAgo
42-
* Added `SmartDateFieldController`
43-
* `setValue()`, `clear()`
44-
* `value`, `hasValue`
50+
- Added `SmartDateField` — smart Flutter form field for date input
51+
- Natural language input — type "tomorrow", "next monday"
52+
- Smart autocomplete suggestions
53+
- Date picker dialog integration
54+
- Min/Max date constraints
55+
- Built-in validation support
56+
- Clear button
57+
- Selected date display with timeAgo
58+
- Added `SmartDateFieldController`
59+
- `setValue()`, `clear()`
60+
- `value`, `hasValue`
4561

4662
## 2.1.0
4763

analysis_options.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,4 @@ linter:
4040
# Flutter specific
4141
use_build_context_synchronously: true
4242
sized_box_for_whitespace: true
43-
use_key_in_widget_constructors: true
43+
use_key_in_widget_constructors: true

example/lib/main.dart

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ import 'tabs/widgets_tab.dart';
99
import 'tabs/ranges_tab.dart';
1010
import 'tabs/analytics_tab.dart';
1111
import 'tabs/calendar_widget_tab.dart';
12-
import 'tabs/date_field_tab.dart'; // 👈 new
12+
import 'tabs/date_field_tab.dart';
13+
import 'tabs/range_picker_tab.dart';
1314

1415
void main() => runApp(const ExampleApp());
1516

@@ -35,7 +36,7 @@ class ExampleHomePage extends StatelessWidget {
3536
@override
3637
Widget build(BuildContext context) {
3738
return DefaultTabController(
38-
length: 11, // 👈 10 → 11
39+
length: 12,
3940
child: Scaffold(
4041
appBar: AppBar(
4142
backgroundColor: Colors.indigo,
@@ -45,7 +46,7 @@ class ExampleHomePage extends StatelessWidget {
4546
children: [
4647
Text('smart_date_formatter',
4748
style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold)),
48-
Text('v2.2.0 — Full Example',
49+
Text('v2.4.0 — Full Example',
4950
style: TextStyle(fontSize: 11, color: Colors.white70)),
5051
],
5152
),
@@ -65,7 +66,8 @@ class ExampleHomePage extends StatelessWidget {
6566
Tab(text: '🗄 Ranges'),
6667
Tab(text: '📊 Analytics'),
6768
Tab(text: '🗓 SmartCalendar'),
68-
Tab(text: '📝 DateField'), // 👈 new
69+
Tab(text: '📝 DateField'),
70+
Tab(text: '📆 RangePicker'),
6971
],
7072
),
7173
),
@@ -82,6 +84,7 @@ class ExampleHomePage extends StatelessWidget {
8284
AnalyticsTab(),
8385
CalendarWidgetTab(),
8486
DateFieldTab(),
87+
RangePickerTab(),
8588
],
8689
),
8790
),

0 commit comments

Comments
 (0)