Skip to content

Commit 9b0e0ab

Browse files
feat: SmartCalendar widget with month/week/day views + controller for v2.0.0
1 parent 7f35a35 commit 9b0e0ab

16 files changed

Lines changed: 1976 additions & 35 deletions

CHANGELOG.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,27 @@
1+
## 2.0.0
2+
3+
* 🎉 Major release — Full Calendar Widget!
4+
* Added `SmartCalendar` widget
5+
* Month view — full grid calendar
6+
* Week view — week strip with events list
7+
* Day view — single day detail view
8+
* View switcher — switch between month/week/day
9+
* Today button — jump to today
10+
* Smooth navigation with chevron buttons
11+
* Added `SmartCalendarController`
12+
* `nextMonth/previousMonth`
13+
* `nextWeek/previousWeek`
14+
* `nextDay/previousDay`
15+
* `jumpToDate/jumpToMonth`
16+
* `goToToday/selectDate`
17+
* `isCurrentMonth`
18+
* Added `CalendarEvent` model
19+
* title, date, color, description
20+
* allDay, startTime, endTime
21+
* `isOnDate()`, `timeString`
22+
* Added `EventMarkerStyle` — dot, chip, both
23+
* Added `CalendarView` — month, week, day
24+
125
## 1.6.0
226

327
* SmartParser — major improvements

example/lib/main.dart

Lines changed: 32 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,40 @@
11
import 'package:flutter/material.dart';
2-
import 'pages/time_ago_page.dart';
3-
import 'pages/calendar_page.dart';
4-
import 'pages/format_page.dart';
5-
import 'pages/calculations_page.dart';
6-
import 'pages/localization_page.dart';
7-
import 'pages/parser_page.dart';
8-
import 'pages/widgets_page.dart';
9-
import 'pages/ranges_page.dart';
10-
import 'pages/analytics_page.dart';
2+
import 'tabs/time_ago_tab.dart';
3+
import 'tabs/calendar_tab.dart';
4+
import 'tabs/format_tab.dart';
5+
import 'tabs/calculate_tab.dart';
6+
import 'tabs/locale_tab.dart';
7+
import 'tabs/parser_tab.dart';
8+
import 'tabs/widgets_tab.dart';
9+
import 'tabs/ranges_tab.dart';
10+
import 'tabs/analytics_tab.dart';
11+
import 'tabs/calendar_widget_tab.dart'; // 👈 new
1112

12-
void main() => runApp(const SmartDateDemoApp());
13+
void main() => runApp(const ExampleApp());
1314

14-
/// Root app for smart_date_formatter interactive playground.
15-
class SmartDateDemoApp extends StatelessWidget {
16-
const SmartDateDemoApp({super.key});
15+
/// Root app for smart_date_formatter example.
16+
class ExampleApp extends StatelessWidget {
17+
const ExampleApp({super.key});
1718

1819
@override
1920
Widget build(BuildContext context) {
2021
return MaterialApp(
21-
title: 'smart_date_formatter Playground',
22+
title: 'SmartDateFormatter Example',
2223
debugShowCheckedModeBanner: false,
2324
theme: ThemeData(colorSchemeSeed: Colors.indigo, useMaterial3: true),
24-
home: const PlaygroundHome(),
25+
home: const ExampleHomePage(),
2526
);
2627
}
2728
}
2829

29-
/// Main playground with all feature tabs.
30-
class PlaygroundHome extends StatelessWidget {
31-
const PlaygroundHome({super.key});
30+
/// Home page with tabbed navigation showing all features.
31+
class ExampleHomePage extends StatelessWidget {
32+
const ExampleHomePage({super.key});
3233

3334
@override
3435
Widget build(BuildContext context) {
3536
return DefaultTabController(
36-
length: 9,
37+
length: 10, // 👈 9 → 10
3738
child: Scaffold(
3839
appBar: AppBar(
3940
backgroundColor: Colors.indigo,
@@ -43,7 +44,7 @@ class PlaygroundHome extends StatelessWidget {
4344
children: [
4445
Text('smart_date_formatter',
4546
style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold)),
46-
Text('Interactive Playground v1.5.0',
47+
Text('v2.0.0 — Full Example',
4748
style: TextStyle(fontSize: 11, color: Colors.white70)),
4849
],
4950
),
@@ -62,20 +63,22 @@ class PlaygroundHome extends StatelessWidget {
6263
Tab(text: '⏳ Widgets'),
6364
Tab(text: '🗄 Ranges'),
6465
Tab(text: '📊 Analytics'),
66+
Tab(text: '🗓 SmartCalendar'), // 👈 new
6567
],
6668
),
6769
),
6870
body: const TabBarView(
6971
children: [
70-
TimeAgoPage(),
71-
CalendarPage(),
72-
FormatPage(),
73-
CalculationsPage(),
74-
LocalizationPage(),
75-
ParserPage(),
76-
WidgetsPage(),
77-
RangesPage(),
78-
AnalyticsPage(),
72+
TimeAgoTab(),
73+
CalendarTab(),
74+
FormatTab(),
75+
CalculateTab(),
76+
LocaleTab(),
77+
ParserTab(),
78+
WidgetsTab(),
79+
RangesTab(),
80+
AnalyticsTab(),
81+
CalendarWidgetTab(),
7982
],
8083
),
8184
),

0 commit comments

Comments
 (0)