A responsive Flutter portfolio for Vivek Kumar β built with clean architecture, Riverpod, and go_router.
Live site: https://vvk027.github.io/
portfolio_recording.mp4
- Features
- Tech stack
- Architecture
- Theming
- Getting started
- Development
- Build
- Deploy to GitHub Pages
- Configuration
- Assets
- License
- Responsive layout β Adaptive toolbar, spacing, and section layout for mobile, tablet, and desktop breakpoints.
- Portfolio sections β About, skills, experience, projects, reviews, awards, education, certifications, and contact, driven from
assets/data.json. - Section navigation β Sticky nav with scroll-synced active section via
ScrollablePositionedList. - Deep links β Shareable URLs for each section (
/section/:id) withgo_router. - Light and dark theme β Material 3 themes with a semantic color system; toggle in the app bar (defaults to dark).
- Projects gallery β Tag filters, project cards with previews, and a detail bottom sheet.
- Section carousels β Paged carousels with controls and optional auto-play for multi-card content.
- Contact and social β Email, phone, location, and social links (GitHub, LinkedIn, WhatsApp, etc.) via
url_launcher. - JSON-driven content β Edit copy, metrics, experience, and projects without changing UI code.
- CI pipeline β Analyze, test, build web, and deploy on pushes to
main(see Deploy to GitHub Pages).
- Flutter & Dart
- Riverpod β state management
- go_router β URL navigation and section deep links
- json_serializable β typed JSON models
- ScrollablePositionedList β anchored section scrolling
- Poppins β bundled custom font family
lib/
βββ domain/ # Entities, use cases, repository interfaces
βββ data/ # Data sources, DTOs, mappers, repository implementations
βββ presentation/ # Screens, widgets, Riverpod providers
βββ core/ # App shell, routing, theming, providers
Data is loaded from assets/data.json, parsed on a background isolate, and mapped to domain entities.
The app ships with light and dark Material 3 themes. Both share the same structure; colors and typography are tuned per brightness.
| Piece | Role |
|---|---|
lib/core/theme/app_theme.dart |
Builds lightTheme and darkTheme (ThemeData, ColorScheme, component themes) |
lib/core/theme/app_colors.dart |
Semantic palette as a ThemeExtension<AppColors> (AppColors.light / AppColors.dark) |
lib/core/theme/app_fonts.dart |
Poppins family applied across the text theme |
lib/core/provider/app_theme_provider.dart |
Riverpod themeModeProvider β defaults to ThemeMode.dark |
lib/presentation/widgets/theme_toggle_button.dart |
Sun / moon control in the profile header |
PortfolioApp wires themes into MaterialApp.router:
theme: lightTheme,
darkTheme: darkTheme,
themeMode: themeMode, // from themeModeProviderThe toggle switches between ThemeMode.light and ThemeMode.dark for the current session. Preference is not written to local storage yet.
Prefer semantic tokens over hard-coded Color values:
import 'package:vivekdevfolio/core/theme/app_colors.dart';
final colors = context.appColors; // ThemeExtension helper
// colors.accent, colors.card, colors.textPrimary, β¦AppColors covers layout surfaces (scaffold, card, borders), navigation, carousels, chips, project previews, store-link buttons, ratings, and contact/stat gradients. Add or adjust tokens in app_colors.dart for both light and dark static instances.
- Palette β Edit
AppColors.lightandAppColors.darkinlib/core/theme/app_colors.dart. - Typography β Adjust sizes and weights in
_baseTextThemeinsidelib/core/theme/app_theme.dart. - Default mode β Change the initial value in
themeModeProvider(app_theme_provider.dart). - Fonts β Replace files under
assets/fonts/and updatepubspec.yaml+AppFonts.family.
Light mode uses a soft slate-on-white look with indigo accents; dark mode uses deep navy surfaces with purple/violet accents and higher-contrast text.
Prerequisites: Flutter (stable) and Chrome for web.
flutter pub get
dart run build_runner build --delete-conflicting-outputs
flutter run -d chrome# Static analysis
flutter analyze
# Tests (with coverage, matching CI)
flutter test --coverage
# Regenerate JSON models after changing portfolio_model.dart
dart run build_runner build --delete-conflicting-outputsflutter build web --releaseOutput is in build/web/.
For a project site served at https://<user>.github.io/<repo>/, set the base path when building:
flutter build web --release --base-href="/<repo>/"For a user or organization site at https://<user>.github.io/, use --base-href="/" (the default).
- Build:
flutter build web --release(add--base-hrefif the app is not hosted at the domain root; see Build). - Options
- Serve the
build/webfolder with any static host. - For GitHub Pages, enable Pages in the repository Settings β Pages and publish the build artifacts (for example, via a deploy workflow or a manual
gh-pagesbranch).
- Serve the
- Typical Pages deployment step (append to a workflow after the web build):
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build/webThis repository includes .github/workflows/main.yml, which runs flutter analyze, tests, flutter build web --release, and deploys build/web via peaceiris/actions-gh-pages. Adjust publish_dir, branch, or external_repository in that workflow to match your Pages setup.
Live site: https://vvk027.github.io/
Portfolio content lives in assets/data.json. Key top-level fields include:
| Field | Purpose |
|---|---|
name, title, location, summary |
Profile header and about copy |
strengths |
Strength cards in the about area |
experience, education, certifications, awards |
Timeline and credential sections |
skills |
Grouped skill categories |
projects |
Gallery entries (tags, links, preview image paths) |
reviews |
Client/colleague testimonials |
contact |
Email, phone, social URLs |
After editing JSON, hot restart the app (or rebuild for release). No code changes are required unless you add new fields that need UI support.
assets/
βββ data.json # All portfolio copy and structured data
βββ profile.jpeg # Profile photo
βββ fonts/ # Poppins Regular & Italic
βββ icons/ # SVG social icons (GitHub, LinkedIn, WhatsApp, β¦)
βββ projects/ # Project preview images (*_preview.jpg)
MIT β see LICENSE.
