Skip to main content

fast_sea 0.6.15 copy "fast_sea: ^0.6.15" to clipboard
fast_sea: ^0.6.15 copied to clipboard

A Flutter UI library built on liquid_glass_widgets & GetX, providing Sea-prefixed reusable components: glass cards, buttons, toast, loading, refresh lists, ads, and more.

fast_sea #

A Flutter UI library built on liquid_glass_widgets & GetX, providing Sea-prefixed reusable components: glass cards, buttons, toast, loading, refresh lists, ads, Supabase auth, Firebase analytics, and more.

Features #

  • ๐Ÿš€ One Widget Setup โ€” SeaApp widget configures everything: ads, Firebase, Supabase, glass theme, background, loading
  • ๐Ÿซง Glass Widgets โ€” Full wrapping of liquid_glass_widgets 1.3.0 with Sea-prefixed API
  • ๐Ÿ“ฑ Page Base โ€” SeaAppPage is the whole page skeleton: iOS 27 large- or compact-title chrome, a glass bar that materialises as you scroll, the page gutter and the bottom clearance
  • ๐ŸŽจ Theme System โ€” SeaColors, SeaTextStyles, SeaGlassTheme with light/dark support
  • ๐Ÿž Toast & Loading โ€” Sea.showSuccess(), Sea.showLoading(), Sea.loadingTask() โ€” iOS 27 glass style
  • โšก Loading Task โ€” Sea.loadingTask<T>() wraps async operations with auto loading/dismiss
  • ๐Ÿ”„ Refresh โ€” SeaRefreshWidget with pull-down refresh & pull-up load more
  • ๐Ÿ“„ Page Mixin โ€” SeaPageMixin<T, F> for paginated data loading
  • ๐Ÿ“„ Status Mixin โ€” SeaStatusMixin<T> for loading/error/empty three-state pages
  • ๐Ÿ“ข Ads โ€” SeaAdsWidget with Banner, Interstitial, Rewarded, AppOpen ad support
  • ๐Ÿ” Supabase Auth โ€” SeaSupabase with login, signup, OAuth, password reset, iOS 27-style auth UI
  • ๐Ÿ“Š Firebase Analytics โ€” SeaAnalytics with event logging, screen tracking
  • ๐Ÿ›  Services โ€” SeaLog, SeaDevice, SeaStorage, SeaHttp, SeaConnectivity, SeaPermission, SeaRating
  • ๐ŸŽฏ GetX โ€” State management & navigation via get
  • ๐ŸŒ“ Theme Switching โ€” Sea.theme.toggle() / Sea.theme.setLight() / Sea.theme.setDark()
  • ๐Ÿ“ฑ iOS 27 Auth UI โ€” SeaAuthPage with glass morphism login/signup/forgot password flows, centered glass dialog via Sea.dialog.loginDialog()
  • ๐ŸŒ WebView โ€” SeaWebView with iOS-style browser chrome, smooth progress indicator, navigation controls, and native system sharing
  • ๐Ÿ“‹ App Identity & About โ€” reusable SeaAppIcon uses the configured app icon with a built-in fallback; SeaGlassAboutPage includes privacy policy and user agreement links
  • โš™๏ธ App Info Config โ€” SeaAppInfoConfig for app name, icon path, privacy/agreement URLs, default email
  • ๐ŸŒ i18n โ€” SeaLocaleService with GetX translations, per-locale on-demand JSON loading, 300+ locales (all world languages), built-in + app-level merge
  • ๐Ÿ“ Files & Cache โ€” Sea.file unified file directory: pick file/image/video/audio, camera capture, save, share, open, cache size & clearing
  • ๐Ÿ–ผ Image โ€” SeaImageWidget with automatic width/height from ratio, cached network images, asset & local-file support

Demo App #

A full demo app is available in the example/ directory, showcasing all 60+ components with iOS 27 glass morphism style.

cd example && flutter run

Demo Structure #

Tab Content
Library All library code usage: Services API, App Info, Buttons, Input, Feedback, Display, Typography, Colors, Theme, Glass Effects, Navigation, Overlays & Sheets, Mixins & Utilities
Apple Apps iOS 27-style recreations: Messages, Weather, Notes, Music, Settings, Safari (WebView), Auth (Dialog + Full Page)

Quick Start #

1. Install #

Add to your pubspec.yaml:

dependencies:
  fast_sea: ^0.4.0

2. Import #

import 'package:fast_sea/fast_sea.dart';

3. Use SeaApp โ€” That's It! #

void main() {
  runApp(const SeaApp(
    title: 'My App',
    home: HomePage(),
    // Optional: AdMob (grouped config)
    adsConfig: SeaAdsConfig(
      googleBannerKey: 'ca-app-pub-xxx/yyy',
      googleAppOpenKey: 'ca-app-pub-xxx/yyy',
      googleRewardKey: 'ca-app-pub-xxx/yyy',
      googlePageKey: 'ca-app-pub-xxx/yyy',
    ),
    // Optional: Firebase (grouped config)
    firebaseConfig: SeaFirebaseConfig(
      enabled: true,
      analytics: true,
    ),
    // Optional: Supabase (grouped config)
    supabaseConfig: SeaSupabaseConfig(
      url: 'https://your-project.supabase.co',
      anonKey: 'your-anon-key',
    ),
    // Optional: Glass theme (grouped config)
    glassConfig: SeaGlassConfig(
      lightGradient: [Color(0xFFE8F5E9), Color(0xFFE3F2FD)],
      darkGradient: [Color(0xFF0D1B0E), Color(0xFF0D1B2A)],
    ),
    // Optional: Services (grouped config)
    servicesConfig: SeaServicesConfig(
      logEnabled: true,
      autoInitStorage: true,
      autoInitDevice: true,
    ),
    // Optional: App info (grouped config)
    appInfoConfig: SeaAppInfoConfig(
      appName: 'My App',
      appIconPath: 'assets/icon/app_icon.png',
      privacyPolicyUrl: 'https://example.com/privacy',
      userAgreementUrl: 'https://example.com/terms',
      defaultEmail: 'user@example.com',
    ),
    // Optional: Locale (i18n)
    // fast_sea ships with built-in locales in assets/locale/
    // Point extraAssetBasePath to your app's own locale JSONs
    localeConfig: SeaLocaleConfig(
      locale: Locale('zh', 'CN'),
      fallbackLocale: Locale('en', 'US'),
      // Optional: this list also drives Sea.locale.supportedLocales.
      supportedLocales: const [
        Locale('en', 'US'),
        Locale('zh', 'CN'),
        Locale('ja', 'JP'),
      ],
      extraAssetBasePath: 'assets/locale',
    ),
  ));
}

No SeaInit.init(), no SeaAppBuilder, no manual controller registration. SeaApp does it all.

4. Unified API โ€” Sea #

Everything is accessible through the Sea class:

// Theme
Sea.theme.toggle();       // Toggle light โ†” dark
Sea.theme.setLight();     // Force light
Sea.theme.setDark();      // Force dark
Sea.theme.setSystem();    // Follow system

// Toast & Loading (iOS 27 glass style)
Sea.showSuccess('Done!');
Sea.showError('Failed');
Sea.showInfo('Tip');
Sea.showToast('Hello');
Sea.showLoading();
Sea.dismiss();

// Loading Task
final data = await Sea.loadingTask(
  task: () => api.fetchItems(),
);

// Log
Sea.log.d('Debug');
Sea.log.i('Info');
Sea.log.w('Warning');
Sea.log.e('Error');

// Device
Sea.device.deviceModel;
Sea.device.osVersion;

// Storage
Sea.storage.setString('key', 'value');
Sea.storage.getString('key');

// HTTP
Sea.http.init(baseUrl: 'https://api.example.com');
final data = await Sea.http.requestGet('/users', fromJson: User.fromJson);

// Connectivity
final online = await Sea.connectivity.isOnline;

// Permission
await Sea.permission.camera();

// Rating
await Sea.rating.requestReview();

// Analytics
Sea.analytics.logEvent(name: 'click');

// Supabase Auth
await Sea.supabase.signInWithEmail(email: 'user@example.com', password: 'pass');
Sea.supabase.isLoggedIn;

// Config
Sea.config.adsConfig.removeAds;
Sea.isReady; // SeaApp configuration is ready; await Sea.servicesReady for services

// App Info
Sea.appInfoConfig.appName;           // 'My App'
Sea.appInfoConfig.appIconPath;       // 'assets/icon/app_icon.png'
Sea.appInfoConfig.privacyPolicyUrl;  // 'https://...'
Sea.appInfoConfig.userAgreementUrl;  // 'https://...'
Sea.appInfoConfig.defaultEmail;      // 'qifendev@gmail.com'
Sea.appTitle;                  // App title from SeaApp
Sea.appName;                   // Configured or platform app name

// Common utilities and platform APIs
Sea.format.bytes(1536);                       // '1.50 KB'
Sea.format.timeAgo(DateTime.now());
Sea.validators.email(email);                 // null when valid
Sea.inputFormatters.phone();                 // TextInputFormatter
await Sea.clipboard.copy('Copied');
await Sea.haptics.selection();
await Sea.url.open('https://example.com');

// i18n / Locale
Sea.locale.tr('common_cancel');                              // Translate key
Sea.locale.tr('time_minutes_ago', params: {'count': '5'});   // With params
Sea.locale.changeLocale(Locale('ja', 'JP'));                  // Switch language
Sea.locale.currentLocale.value;                               // Current locale
Sea.locale.supportedLocales;                                  // App-configured choices
Sea.locale.isLoaded('ja_JP');                                 // Check if loaded
Sea.locale.loadLocale(Locale('fr', 'FR'));                    // Lazy load
Sea.locale.addTranslations('zh_CN', {'my_key': 'ๆˆ‘็š„ๅ€ผ'});    // Add custom translations
Sea.locale.loadLocaleFromAsset('th_TH', 'assets/locale/th_TH.json'); // Load from custom asset
SeaLocales.supportedLocales;                                  // Full built-in locale catalog
SeaLocales.localeDisplayName(Locale('ja', 'JP'));             // 'ๆ—ฅๆœฌ่ชž'

Set SeaLocaleConfig.supportedLocales to the locales your app actually offers. GetMaterialApp locale resolution and Sea.locale.supportedLocales use the same list, so an in-app language page can show only configured choices. It defaults to the full built-in catalog.

Or manually:

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return SeaApp(
      title: 'My App',
      home: const HomePage(),
    );
  }
}

๐ŸŒ i18n / Internationalization #

SeaLocaleService provides a complete i18n solution built on GetX translations with per-locale on-demand JSON loading.

Architecture #

fast_sea/assets/locale/        โ† Built-in common/auth/time keys (300+ locales)
        +
your_app/assets/locale/        โ† App-specific translations (declared via extraAssetBasePath)
        โ†“
SeaLocaleService.loadLocale()  โ† Merges both sources for the requested locale only

Features #

  • 300+ built-in locales available via SeaLocales.supportedLocales; apps can expose a smaller configured subset
  • On-demand loading โ€” only the current locale's JSON is loaded, not all at once
  • Two-tier merge โ€” fast_sea built-in translations + your app-level translations, merged per locale
  • Built-in translations โ€” fast_sea ships with keys for common UI, auth, and time (see table below)
  • Your app translations โ€” place en.json, zh.json, etc. under assets/locale/ and declare extraAssetBasePath
  • Parameterized strings โ€” @key placeholders in translations
  • Fallback locale โ€” falls back to fallbackLocale if key not found in current locale

Built-in Translation Keys #

Category Keys
common common_no_data, common_loading, common_retry, common_cancel, common_confirm, common_ok, common_save, common_delete, common_edit, common_done, common_close, common_back, common_next, common_skip, common_search, common_select, common_submit, common_reset, common_apply, common_yes, common_no, common_all, common_none, common_other, common_more, common_less, common_on, common_off, common_enabled, common_disabled, common_required, common_optional, common_error, common_success, common_warning, common_info, common_no_more_data, common_pull_to_refresh, common_release_to_refresh, common_refreshing, common_load_more, common_loading_more, common_network_error, common_request_timeout, common_server_error, common_unknown_error, common_permission_denied, common_storage_error, common_download, common_upload, common_share, common_copy, common_paste, common_cut, common_undo, common_redo, common_select_all, common_deselect_all, common_move, common_rename, common_replace, common_insert, common_remove, common_clear, common_filter, common_sort, common_group, common_expand, common_collapse, common_show, common_hide, common_lock, common_unlock, common_visible, common_hidden, common_public, common_private, common_favorite, common_unfavorite, common_like, common_dislike, common_follow, common_unfollow, common_block, common_unblock, common_report, common_flag, common_spam, common_mute, common_unmute, common_pin, common_unpin, common_archive, common_unarchive, common_restore, common_recover, common_discard, common_leave, common_join, common_accept, common_decline, common_invite, common_send, common_receive, common_reply, common_forward, common_resend, common_draft, common_published, common_unpublished, common_scheduled, common_pending, common_approved, common_rejected, common_completed, common_failed, common_in_progress, common_paused, common_stopped, common_running, common_idle, common_active, common_inactive, common_online, common_offline, common_busy, common_available, common_unavailable, common_connected, common_disconnected, common_syncing, common_synced, common_out_of_sync, common_updated, common_outdated, common_new_version, common_update_now, common_later, common_install, common_uninstall, common_open, common_open_in_browser, common_open_in_app, common_export, common_import, common_print, common_preview, common_fullscreen, common_exit_fullscreen, common_zoom_in, common_zoom_out, common_rotate, common_flip, common_crop, common_resize, common_quality, common_size, common_color, common_font, common_style, common_format, common_language, common_theme, common_dark_mode, common_light_mode, common_system_mode, common_settings, common_preferences, common_general, common_about, common_help, common_feedback, common_support, common_contact, common_privacy_policy, common_user_agreement, common_terms_of_service, common_version, common_copyright, common_license, common_licenses, common_powered_by, common_developed_by, common_made_with
auth auth_login, auth_logout, auth_signup, auth_register, auth_forgot_password, auth_reset_password, auth_change_password, auth_email, auth_password, auth_confirm_password, auth_username, auth_nickname, auth_phone, auth_verification_code, auth_send_code, auth_resend_code, auth_or, auth_continue_with, auth_sign_in_with_apple, auth_sign_in_with_google, auth_sign_in_with_github, auth_already_have_account, auth_dont_have_account, auth_email_required, auth_password_required, auth_email_invalid, auth_password_too_short, auth_password_not_match, auth_login_failed, auth_signup_failed, auth_reset_email_sent, auth_welcome_back, auth_create_account
time time_just_now, time_minutes_ago, time_hours_ago, time_days_ago, time_weeks_ago, time_months_ago, time_years_ago, time_yesterday, time_today, time_tomorrow

Usage #

1. Configure in SeaApp

SeaApp(
  home: HomePage(),
  localeConfig: SeaLocaleConfig(
    locale: Locale('zh', 'CN'),          // Initial locale
    fallbackLocale: Locale('en', 'US'),   // Fallback locale
    // Point to your app's own locale JSONs (merged on-demand with fast_sea's built-in keys)
    extraAssetBasePath: 'assets/locale',
  ),
)

In your app's pubspec.yaml, register the asset directory:

flutter:
  assets:
    - assets/locale/

Create assets/locale/en.json:

{
  "tab_home": "Home",
  "tab_settings": "Settings",
  "my_greeting": "Hello, World!"
}

Create assets/locale/zh.json:

{
  "tab_home": "้ฆ–้กต",
  "tab_settings": "่ฎพ็ฝฎ",
  "my_greeting": "ไฝ ๅฅฝ๏ผŒไธ–็•Œ๏ผ"
}

The service loads fast_sea/assets/locale/en.json (built-in) and assets/locale/en.json (your app) together when the user switches to English โ€” both are merged automatically.

2. Translate in Code

// Simple translation
Text(Sea.locale.tr('common_cancel'))

// With parameters (use @key placeholders)
Text(Sea.locale.tr('time_minutes_ago', params: {'count': '5'}))
// โ†’ "5ๅˆ†้’Ÿๅ‰" (zh_CN) / "5 min ago" (en_US)

// Check if key exists
if (Sea.locale.hasKey('my_key')) { ... }

// Get all translations for current locale
final all = Sea.locale.getAllTranslations();

3. Switch Language at Runtime

// Change locale (auto-loads JSON if not loaded)
await Sea.locale.changeLocale(Locale('ja', 'JP'));

// Current locale (reactive)
Obx(() => Text('${Sea.locale.currentLocale.value}'))

4. Add Translations at Runtime

The recommended way is extraAssetBasePath in SeaLocaleConfig (see above). For dynamic / runtime additions:

// Add translations in code
await Sea.locale.addTranslations('zh_CN', {
  'order_pending': 'ๅพ…ๅค„็†่ฎขๅ•',
  'order_completed': 'ๅทฒๅฎŒๆˆ่ฎขๅ•',
});

// Load from a custom JSON asset
await Sea.locale.loadLocaleFromAsset('th_TH', 'assets/locale/th_TH.json');

// Load from a Map
await Sea.locale.loadLocaleFromJson('pt_BR', {
  'common_cancel': 'Cancelar',
  'common_confirm': 'Confirmar',
});

5. Locale Display Names

// Get native display name for a locale
SeaLocales.localeDisplayName(Locale('ja', 'JP'));  // 'ๆ—ฅๆœฌ่ชž'
SeaLocales.localeDisplayName(Locale('zh', 'CN'));  // '็ฎ€ไฝ“ไธญๆ–‡'
SeaLocales.localeDisplayName(Locale('ko', 'KR'));  // 'ํ•œ๊ตญ์–ด'

// List all supported locales with display names
for (final locale in SeaLocales.supportedLocales) {
  print('${SeaLocales.localeDisplayName(locale)}: $locale');
}

๐Ÿ“ Files & Cache โ€” Sea.file #

A unified file layer that wraps file_picker, image_picker, path_provider, file_saver, share_plus and open_filex. Every file the app imports or captures is copied into one single directory, so you always know where your data lives and can wipe it with a single call.

Why #

Problem Sea.file answer
Picked file paths become invalid (iOS/Android temp) Picked files are copied into the app's cache directory
Files scattered across temp/cache/documents One root: <docs>/fast_sea/{files,cache}
No idea how big the cache is Sea.file.cacheSize() + formatSize()
Clearing cache means touching several dirs clearCache() / clearFiles() / clearAll()
Five different plugin APIs to remember One facade: Sea.file.*

Directory layout #

<applicationDocuments>/fast_sea/
โ”œโ”€โ”€ files/                 # persistent app-managed files
โ”‚   โ”œโ”€โ”€ images/
โ”‚   โ”œโ”€โ”€ videos/
โ”‚   โ”œโ”€โ”€ audio/
โ”‚   โ”œโ”€โ”€ documents/
โ”‚   โ””โ”€โ”€ others/
โ””โ”€โ”€ cache/                 # picked/captured files, disposable (or OS temp dir)

Setup #

SeaFile is initialised automatically by SeaApp (servicesConfig.autoInitFile defaults to true). Customise it via SeaApp.fileConfig:

SeaApp(
  home: const HomePage(),
  fileConfig: const SeaFileConfig(
    rootFolderName: 'my_app',     // default: 'fast_sea'
    copyPickedFiles: true,        // default: true
    pickedFilesInCache: true,     // default: true
    useTemporaryForCache: false,  // default: false
  ),
)

Or initialise manually when you are not using SeaApp:

await SeaFile.init(config: const SeaFileConfig());

Picked and captured files are copied into cache/<kind>/ by default. Set pickedFilesInCache: false to keep copied items in persistent files/<kind>/.

Quick start #

// Pick
final image = await Sea.file.pickImage();
final files = await Sea.file.pickFiles();
final video = await Sea.file.pickVideo();
final audio = await Sea.file.pickAudio();

// Camera
final photo = await Sea.file.takePhoto();
final clip  = await Sea.file.takeVideo();

// Save out of the app / share / open
await Sea.file.saveToDevice(path: photo!.path, name: photo.displayName);
await Sea.file.sharePath(photo.path, fileName: photo.displayName);
await Sea.file.open(photo.path);

// Cache
final bytes = await Sea.file.cacheSize();
print(Sea.file.formatSize(bytes));   // e.g. "12.4 MB"
await Sea.file.clearCache();

API #

Picking (file_picker)

Method Returns
pickFile() SeaFileResult?
pickFiles() List<SeaFileResult>
pickImage() / pickImages() SeaFileResult? / List
pickVideo() / pickVideos() SeaFileResult? / List
pickAudio() / pickAudios() SeaFileResult? / List
pickMedia() List<SeaFileResult> (images + videos)
pickDirectory() String?

Camera & gallery (image_picker)

Method Returns
takePhoto() / takeVideo() SeaFileResult?
pickImageFromGallery() / pickVideoFromGallery() SeaFileResult?
pickMultipleMedia() List<SeaFileResult>

Save / share / open

Method Backed by
saveToDevice(path:) ยท saveBytesToDevice(bytes:) ยท saveAs(path:) file_saver
sharePath() ยท sharePaths() ยท shareResults() ยท shareText() share_plus
open(path) open_filex

Cache & size

Method Description
cacheSize() / filesSize() / totalSize() Size in bytes
sizeOfDirectory(dir) Size of any directory
clearCache() Wipe the cache folder
clearFiles() Wipe the imported files
clearKind(kind) Wipe one category only
clearAll() Wipe everything
formatSize(bytes) "1.24 MB"

Directories & utilities

rootDirectory ยท filesDirectory ยท cacheDirectory ยท directoryFor(kind) ยท listFiles(kind:) ยท deleteFile(path) ยท delete(result) ยท mimeTypeOf(path) ยท kindOf(path) ยท kindOfMime(mime)

SeaFileResult #

final f = await Sea.file.pickImage();
f!.path;          // absolute path inside the unified directory
f.displayName;    // original file name (falls back to the stored name)
f.size;           // bytes
f.sizeText;       // "2.31 MB"
f.mimeType;       // "image/png"
f.kind;           // SeaFileKind.image
f.xFile;          // XFile โ€” ready for upload / share

Notes #

  • Mobile/desktop only โ€” the service relies on dart:io paths and throws UnsupportedError on web.
  • Remember to request the relevant permissions (Sea.permission.photos(), .camera()) before picking on iOS/Android.
  • Set copyPickedFiles: false to keep platform paths (not recommended: they can expire).
  • Picked files are copied to cache/ by default; set pickedFilesInCache: false to keep them in persistent files/.
  • Full reference: doc/FILE_MODULE.md

๐Ÿ–ผ Image โ€” SeaImageWidget #

lib/src/widgets/display/sea_image_widget.dart โ€” ported from FastImageWidget (fast_code) and renamed to the Sea convention. It sizes itself from a ratio and picks the right image provider automatically.

Quick start #

// Fixed height, width derived from the ratio
SeaImageWidget(
  imageUrl: 'https://example.com/photo.jpg',
  height: 120,
  ratio: 16 / 9,      // ratio = height / width  โ†’ width = 67.5
  fit: BoxFit.cover,
  borderRadius: BorderRadius.circular(12),
)

// Fixed width, height derived from the ratio
SeaImageWidget(imageUrl: url, width: 200, ratio: 16 / 9)  // height = 112.5

// Assets (also matches 'packages/...' paths)
SeaImageWidget(imageUrl: 'assets/images/logo.png', width: 96, ratio: 1)

// Local files โ€” pairs with Sea.file
final picked = await Sea.file.pickImage();
SeaImageWidget(imageUrl: picked!.path, height: 160, ratio: 4 / 3)

Source detection #

imageUrl Provider
assets/โ€ฆ, packages/โ€ฆ Image.asset
/โ€ฆ, file://โ€ฆ Image.file (skipped on web)
anything else CachedNetworkImage

Overlay #

stackBuilder receives the resolved width/height, so gradients, badges or play buttons line up exactly with the image:

SeaImageWidget(
  imageUrl: thumb,
  height: 200,
  ratio: 16 / 9,
  borderRadius: BorderRadius.circular(16),
  stackBuilder: (w, h) => const Align(
    alignment: Alignment.center,
    child: Icon(CupertinoIcons.play_fill, color: Colors.white, size: 44),
  ),
)

Parameters #

Parameter Type Notes
imageUrl String? url / asset path / file path
height double? with ratio โ†’ derives width
width double? with ratio โ†’ derives height
ratio double? height / width
fit BoxFit? default BoxFit.contain
color Color? blend colour
borderRadius BorderRadius? clips the image
border Border? drawn around the image
alignment Alignment default Alignment.center
placeholder Widget Function(BuildContext, String)? network only
errorWidget Widget Function(BuildContext, String, Object)? network only
stackBuilder Widget Function(double w, double h)? overlay
cacheKey String? forwarded to CachedNetworkImage
cacheRatio double? disk/memory cache = ratio ร— screen size

Notes #

  • Backed by cached_network_image ^3.4.1. Version 4.x requires Flutter >=3.44, so the library stays on 3.x while its floor is 3.41.
  • ratio is height / width โ€” the same convention as the original FastImageWidget. Pass ratio: 1 for a square.
  • Migration from fast_code: rename FastImageWidget โ†’ SeaImageWidget; everything else matches.

SeaApp โ€” All-in-One Widget #

SeaApp replaces SeaInit.init() + SeaAppBuilder. One widget, zero boilerplate.

SeaApp Parameters #

Parameter Type Default Description
home Widget required Root page
title String '' App title
lightTheme ThemeData? null Light mode theme
darkTheme ThemeData? null Dark mode theme
themeMode ThemeMode system Initial theme mode
persistThemeMode bool true Restore and persist the selected theme using Sea.storage
persistLocale bool true Restore and persist the selected locale using Sea.storage
primaryColor Color? null Primary color override
adsConfig SeaAdsConfig SeaAdsConfig() AdMob configuration
firebaseConfig SeaFirebaseConfig SeaFirebaseConfig() Firebase configuration
supabaseConfig SeaSupabaseConfig SeaSupabaseConfig() Supabase configuration
glassConfig SeaGlassConfig SeaGlassConfig() Glass theme configuration
servicesConfig SeaServicesConfig SeaServicesConfig() Services configuration
appInfoConfig SeaAppInfoConfig SeaAppInfoConfig() App info: name, icon, privacy/agreement URLs, default email

SeaApp initializes Flutter binding and storage before its first frame, then restores and persists the saved theme and locale automatically. The Sea.dialog facade keeps information alerts centred and presents operations and choices in a bottom glass sheet:

await Sea.dialog.showInfo(context: context, title: 'Saved');
final confirmed = await Sea.dialog.showConfirm(
  context: context,
  title: 'Delete item?',
  message: 'This cannot be undone.',
  isDestructive: true,
);
await Sea.dialog.loginDialog(context: context);
final date = await Sea.dialog.showDatePicker(context: context);
final time = await Sea.dialog.showTimePicker(context: context);
final dateTime = await Sea.dialog.showDateTimePicker(context: context);

It also exposes showActionSheet, showSelection, showMultiSelection, and standard appearance/language pickers. The language picker only displays locales configured in SeaLocaleConfig.supportedLocales / SeaApp.supportedLocales. Bottom operation and selection sheets size themselves to their content and do not expand when dragged; each tappable option is an independent glass tile.

Configuration Objects #

SeaAdsConfig

const SeaAdsConfig(
  googleBannerKey: 'ca-app-pub-xxx/yyy',
  googleAppOpenKey: 'ca-app-pub-xxx/yyy',
  googleRewardKey: 'ca-app-pub-xxx/yyy',
  googlePageKey: 'ca-app-pub-xxx/yyy',
  removeAds: false,
  onAdsReady: null,
)

SeaFirebaseConfig

const SeaFirebaseConfig(
  enabled: true,
  analytics: true,
  onReady: null,
)

SeaSupabaseConfig

const SeaSupabaseConfig(
  url: 'https://your-project.supabase.co',
  anonKey: 'your-anon-key',
  onReady: null,
)

SeaGlassConfig

const SeaGlassConfig(
  lightGradient: [Color(0xFFE8F5E9), Color(0xFFE3F2FD)],
  darkGradient: [Color(0xFF0D1B0E), Color(0xFF0D1B2A)],
  glowBlobs: null,
  themeData: null,
)

The global gradient background can be toggled at runtime. Set both lightBackground and darkBackground to null in SeaGlassConfig to start with it disabled; enabling it uses a SeaGlassBackground with the configured gradients and glow blobs:

Obx(
  () => SeaGlassSwitch(
    value: Sea.glass.gradientBackgroundEnabled.value,
    onChanged: Sea.glass.setGradientBackgroundEnabled,
  ),
)

SeaServicesConfig

const SeaServicesConfig(
  logEnabled: true,
  autoInitStorage: true,
  autoInitDevice: true,
  autoInitFile: true,   // creates the unified files/ + cache/ directories
)

SeaFileConfig

const SeaFileConfig(
  rootFolderName: 'fast_sea',     // folder created inside the app documents dir
  copyPickedFiles: true,          // copy picks into the unified directory
  useTemporaryForCache: false,    // put cache/ in the OS temp dir instead
)

SeaAppInfoConfig

const SeaAppInfoConfig(
  appName: 'My App',                      // App display name
  appIconPath: 'assets/icon/app_icon.png', // App icon asset path
  privacyPolicyUrl: 'https://example.com/privacy', // Privacy policy URL
  userAgreementUrl: 'https://example.com/terms',    // User agreement URL
  defaultEmail: 'qifendev@gmail.com',      // Default email for auth forms
)

Sea โ€” Unified API #

All runtime operations through one class:

Theme #

Sea.theme.toggle();       // Toggle light โ†” dark
Sea.theme.setLight();     // Force light
Sea.theme.setDark();      // Force dark
Sea.theme.setSystem();    // Follow system
Sea.theme.isDark.value;   // Reactive bool
Sea.theme.themeMode.value; // Reactive ThemeMode

Toast & Loading (iOS 27 glass style) #

Sea.showSuccess('Saved!');
Sea.showError('Failed');
Sea.showInfo('Tip');
Sea.showToast('Hello');
Sea.showLoading();
Sea.showLoading('Fetching...');
Sea.showProgress(0.5, 'Downloading...');
Sea.dismiss();
Sea.isLoadingShowing; // bool

Loading Task #

// Simple
final result = await Sea.loadingTask<int>(
  task: () => api.fetchCount(),
);

// Without loading indicator
final data = await Sea.loadingTask(
  task: () => api.fetchData(),
  showLoading: false,
);
Parameter Type Default Description
task FutureOr<T> Function() required The operation; its result is returned and errors propagate
message String? null Optional loading message
showLoading bool true Show and dismiss the loading indicator around the operation

Config #

Sea.config.adsConfig.removeAds;
Sea.config.glassConfig.quality;
Sea.config.fileConfig.pickedFilesInCache;
Sea.config.appInfoConfig.defaultEmail;
Sea.isReady; // synchronous SeaApp configuration is available
await Sea.servicesReady; // async service bootstrap has completed

Theme #

SeaColors #

Predefined color palette with light/dark schemes:

// Static colors
SeaColors.primary    // #20BFA9
SeaColors.secondary  // #34C759
SeaColors.accent     // #5856D6
SeaColors.success    // #34C759
SeaColors.warning    // #FF9500
SeaColors.danger     // #FF3B30
SeaColors.info       // #5AC8FA

// Adaptive scheme
final scheme = SeaColors.of(context); // auto light/dark
scheme.background
scheme.surface
scheme.glassSurface
scheme.label
scheme.secondaryLabel
scheme.tertiaryLabel
scheme.divider

// Explicit schemes
SeaColors.light
SeaColors.dark

SeaTextStyles #

iOS-style typography scale:

SeaTextStyles.largeTitle(context)   // 34pt bold
SeaTextStyles.title1(context)       // 28pt bold
SeaTextStyles.title2(context)       // 22pt bold
SeaTextStyles.title3(context)       // 20pt semibold
SeaTextStyles.headline(context)     // 17pt semibold
SeaTextStyles.body(context)         // 17pt regular
SeaTextStyles.subheadline(context)  // 15pt regular
SeaTextStyles.sectionHeader(context) // 13pt semibold
SeaTextStyles.caption               // 12pt regular (const)

SeaGlassStyle & SeaGlassTheme #

Glass effect presets and theme configuration:

// Presets
SeaGlassStyle.card        // blur:16, thickness:24, radius:20
SeaGlassStyle.sheet       // blur:30, thickness:40, radius:32
SeaGlassStyle.button      // blur:8, thickness:16, radius:28
SeaGlassStyle.navigation  // blur:25, thickness:30, radius:28
SeaGlassStyle.tile        // blur:10, thickness:16, radius:16

// Custom style
final style = SeaGlassStyle(
  blur: 20,
  thickness: 30,
  borderRadius: 24,
  glowIntensity: 0.7,
);

// Convert to LiquidGlassSettings
style.toSettings();

// Theme data for GlassTheme
SeaGlassTheme.themeData

// Adaptive settings for current brightness
SeaGlassTheme.settingsFor(context)

Glass Widgets #

SeaGlassScaffold #

Lower-level glass layout primitive for app shells and custom layouts. For a standard screen, prefer SeaAppPage, which adds the iOS page chrome, automatic back button, and content insets:

SeaGlassScaffold(
  appBar: SeaGlassNavigationBar(title: Text('Home')),
  body: Center(child: Text('Hello')),
  bottomBar: SeaGlassTabBar(...),
)
Parameter Type Default Description
body Widget required Page content
appBar Widget? null Top app bar
bottomBar Widget? null Bottom navigation
backgroundColor Color? null Background color
background Widget? SeaGlassBackground() Background widget
quality GlassQuality? app-wide setting Ceiling on this page's shader quality, bars included

SeaGlassCard #

Glass morphism card container:

SeaGlassCard(
  margin: EdgeInsets.all(12),
  padding: EdgeInsets.all(16),
  onTap: () => print('tapped'),
  child: Text('Card Content'),
)
Parameter Type Default Description
child Widget? null Card content
padding EdgeInsetsGeometry all(16) Inner padding
margin EdgeInsetsGeometry? null Outer margin
width double? null Fixed width
height double? null Fixed height
useOwnLayer bool false Use independent glass layer
useGlassEffect bool true Enable glass effect
borderRadius double 10 Corner radius (non-glass mode)
backgroundColor Color? null Background (non-glass mode)
onTap VoidCallback? null Tap handler
onLongPress VoidCallback? null Long press handler

SeaGlassButton #

Glass morphism button:

SeaGlassButton(
  label: 'Submit',
  icon: CupertinoIcons.checkmark,
  isPrimary: true,
  onTap: () => handleSubmit(),
)

SeaGlassButton(
  label: 'Delete',
  isDestructive: true,
  onTap: () => handleDelete(),
)
Parameter Type Default Description
label String required Button text
icon IconData? null Leading icon
onTap VoidCallback? null Tap handler
enabled bool true Enabled state
width double? null Fixed width
height double 50 Fixed height
isPrimary bool false Primary style
isDestructive bool false Destructive style
useGlassEffect bool true Enable glass effect
iconColor Color? null Icon color override
labelColor Color? null Label color override
backgroundColor Color? null Background color override

SeaGlassIconButton #

Glass morphism icon button:

SeaGlassIconButton(
  icon: CupertinoIcons.add,
  onPressed: () => addItem(),
)
Parameter Type Default Description
icon IconData required Icon data
onPressed VoidCallback? null Press handler
tooltip String? null Tooltip text
useGlassEffect bool true Enable glass effect
size double SeaSizes.barButton (34) Side of the drawn glass circle โ€” the middle step of iOS's button ramp (28/34/50), what the platform draws in its own bars
minTapTarget double SeaSizes.control (44) The touchable side, independent of the drawn size. The HIG minimum applies to the target, not the circle โ€” the glass shrinks, the tap area does not

SeaGlassListTile #

Glass morphism list tile:

SeaGlassListTile(
  leading: Icon(CupertinoIcons.person),
  title: Text('John Doe'),
  subtitle: Text('john@example.com'),
  trailing: Icon(CupertinoIcons.chevron_right),
  onTap: () => openProfile(),
)

// A row whose control is too wide for the trailing slot:
SeaGlassListTile(
  title: Text('Volume'),
  subtitle: Text('Applies to media only.'),
  child: SeaGlassSlider(value: v, onChanged: set),
)
Parameter Type Default Description
leading Widget? null Leading widget
title Widget required Title
subtitle Widget? null Subtitle
trailing Widget? null Trailing widget
child Widget? null A control under the title/subtitle, inside the row
onTap VoidCallback? null Tap handler
onLongPress VoidCallback? null Long press handler
dense bool false Drop the vertical inset, for tightly related rows

child renders inside the row at the row's own gutter, with the title and subtitle above it โ€” the shape a settings or form row takes when the control is too wide for trailing (a slider, a segmented control, a run of buttons). Its cross-axis alignment is start, so a control with a width of its own keeps it and one that wants the row still fills it. onTap then covers the label area only, so the control keeps its own gestures.

SeaGlassListTile.chevron(context) is the standard disclosure mark โ€” use it rather than hand-rolling an Icon, so every disclosure in an app is the same glyph at the same size and colour.

SeaGlassSection #

Grouped section container:

SeaGlassSection(
  header: Text('Settings'),
  footer: Text('Version 1.0'),
  children: [
    SeaGlassListTile(title: Text('General'), onTap: () {}),
    SeaGlassListTile(title: Text('Privacy'), onTap: () {}),
  ],
)
Parameter Type Default Description
children List<Widget> required Section items
header Widget? null Section header
footer Widget? null Section footer
margin EdgeInsetsGeometry? null Outer margin

Children are stretched to the full width of the card. A grouped section puts its rows in a Column that keeps the default cross-axis alignment, so a row narrower than the card would otherwise shrink-wrap and float to the middle. Header and footer use the fast_sea ramp (13pt semibold / 12pt) and preserve the app's font family.

SeaGlassCodeBlock #

A monospaced block of source, in the page's own surface โ€” for documentation and diagnostics:

SeaGlassCodeBlock("SeaNavigator.push(context, page, backLabel: 'Home');")

Kept deliberately plain: no syntax colouring, no gutters, no copy button. The value is that the snippet on screen is the snippet in the source, at the same line breaks. maxLines clamps it.

Parameter Type Default Description
code String required The source, verbatim
maxLines int? null Clamp, with an ellipsis

SeaGlassReadout #

A labelled, selectable value โ€” what a service returned, what a device reported, where a file landed:

SeaGlassReadout(label: 'Resolved path', value: await Sea.file.absolute(path));

An empty or null value renders nothing at all, which is what lets a page wire it straight to a nullable result without a conditional. Monospaced and selectable, because the point of showing a value is usually that someone will copy it.

Parameter Type Default Description
value String? required The value; empty renders nothing
label String? null Caption above the value
maxLines int? null Clamp a long value

SeaGlassTintedIcon #

An iOS settings-row mark: a glyph on its own tinted rounded square. The tint colours the glyph and its background together, so a row cannot end up with a blue icon on a green square.

SeaGlassListTile(
  leading: const SeaGlassTintedIcon(
    icon: CupertinoIcons.bell,
    color: CupertinoColors.systemOrange,
  ),
  title: const Text('Notifications'),
  trailing: SeaGlassListTile.chevron(context),
  onTap: open,
)
Parameter Type Default Description
icon IconData required The glyph
color Color? app primary Tint of glyph and square
size double 32.0 Edge of the square

SeaGlassButtonWrap #

A run of buttons that wraps instead of overflowing โ€” try every variant of one control, where the number of buttons is a fact about the API rather than a layout decision:

SeaGlassButtonWrap(children: [
  SeaGlassButton(label: 'Primary', onTap: () {}),
  SeaGlassButton(label: 'Secondary', onTap: () {}),
]);
Parameter Type Default Description
children List<Widget> required The buttons
spacing double 8.0 Gap between and between lines

SeaAppPage #

The base widget of a fast_sea app. One page, one glass shell, one scroll view, and the iOS 27 chrome that goes with it โ€” the glass background, the navigation bar and its materialisation, the page gutter, and the clearance a floating bar needs. It replaces the two page shapes the library used to ship as separate widgets (SeaGlassSmallTitleScaffold / SeaGlassLargeTitleScaffold): the style is now a parameter, not a class.

// Root of the stack โ€” a 34pt title that collapses into the bar on scroll.
SeaAppPage(
  style: SeaAppPageStyle.large,
  title: 'Messages',
  subtitle: 'App Store-style line under the title',
  children: [section1, section2],
);

// Pushed on top of it โ€” the default, so nothing has to be passed: a 17pt
// centred bar title, a back control labelled with the page you came from,
// and glass on scroll.
SeaNavigator.push(
  context,
  SeaAppPage(
    title: 'Thread',
    children: [section],
  ),
  // The label the pushed page's back control will show.
  backLabel: 'Messages',
);

// Nothing but its content โ€” no title, no style.
SeaAppPage(children: [hero]);
Parameter Type Default Description
title String? null Page title; omit it and the page draws no title
titleWidget Widget? null Custom compact-bar title, for example a live WebView title
style SeaAppPageStyle compact large (stack root) or compact (pushed route)
subtitle String? null Under the title when large; the lead paragraph when compact
leading Widget? SeaGlassBackButton on any poppable page Leading bar control
actions List<Widget> const [] Trailing bar controls
children List<Widget>? null Content: gutter, gaps and bottom clearance handled
slivers List<Widget> const [] Content as slivers, when you need them
body Widget? null Custom full-height body; mutually exclusive with children / slivers
childGap double 20.0 Gap between children
searchBar Widget? null In the large title block, or first in a compact body
background Widget? null Explicit page background
bottomBar Widget? null Floating bottom bar
bottomBarHeight double 60.0 Height reserved for it
bodyOverlays List<Widget>? null Above the body, below the bars
toolbarHeight double 44.0 Bar height, excluding the status bar
physics ScrollPhysics? bouncing Scroll physics
extendBody / edgeFade bool true Body behind the bar / scroll-edge fade
materialize bool true Grow a glass surface behind the bar as content scrolls under it
materializeExtent double 52.0 Scroll distance over which the glass reaches full strength (compact)
scrollController ScrollController? null Drive the compact bar from an external controller
largeTitle* largeTitleFontSize / FontWeight / LetterSpacing / Padding / Trailing

Both title and style are optional. style defaults to compact, because most pages are reached by tapping โ€” so the common page passes neither and gets the compact title, the back control when it can pop, and the glass on scroll for free. Pass style: SeaAppPageStyle.large only on the screen that owns the stack; that is what makes the hierarchy legible, and it is the one thing you have to ask for.

What the library will not do is infer the shape from the route: whether a screen owns the stack is a product decision, and a page that silently changes shape when it is reached a different way โ€” presented instead of pushed, or promoted to the root โ€” is a layout bug that moves. The one thing read from the route is the leading control: a compact page with no leading shows a back button when it can pop, and nothing when it cannot.

A title is optional too. A page that draws its own header โ€” a hero, a custom title block, an empty state โ€” passes no title and keeps the chrome, the gutter and the scroll view. On a large page, where the title is what collapses, an untitled page has nothing to collapse; its bar comes in on the scroll offset instead of staying transparent forever.

Design your pages around children. Each one gets the page gutter (SeaPageSliver), childGap between them, and the trailing clearance for a floating bar (SeaBottomInset) โ€” the whole skeleton of an iOS page, in the library rather than in every app, so a section cannot be added without the gutter and a new page cannot ship with its last row under the tab bar. Reach for slivers only when you need real slivers (a lazily built SliverList); it places its own insets and is not wrapped twice.

The compact bar is transparent at rest โ€” just its text and controls floating over the page. As content scrolls beneath it, an edge-to-edge glass surface materialises with the scroll offset and reaches full strength after materializeExtent. The surface never eats a tap while it is still transparent. The large page runs the full native chain instead: large title โ†’ scroll collapse โ†’ glass bar โ†’ compact title, all driven by the scroll offset, so reversing restores it.

SeaGlassBackButton #

The back control of a pushed page: a contained, icon-only glass button.

iOS 26 replaced the labelled back control with a contained icon button. Where iOS 18 drew a chevron plus a breadcrumb naming the previous screen, the system now draws a single circular glass button โ€” the same shape as every other bar button โ€” and the breadcrumb is gone. A wide "โ€น Previous" pill beside a centred title is the fastest way for a screen to look like it was designed for an older release.

The previous page's title is not discarded: it becomes the control's tooltip and accessibility label, so VoiceOver still announces where back goes.

SeaNavigator.push(context, const DetailPage(), backLabel: 'Inbox');

The label travels on the pushed route's RouteSettings (as a SeaBackLabel), so nothing global is involved.

Parameter Type Default Description
label String? null Overrides the label carried by the route
onTap VoidCallback? pops the route Tap handler
showsTitle bool false Draw the title next to the chevron, as a capsule
labelLimit int 12 Characters before ellipsis, when showsTitle is on

Set showsTitle: true for an app that has not adopted the iOS 26 toolbar, or for a hierarchy deep enough that naming the parent is worth the width.

SeaGlassNavigationBar #

Glass app bar with large title support:

SeaGlassNavigationBar(
  title: Text('My App'),
  leading: BackButton(),
  actions: [SeaGlassIconButton(icon: CupertinoIcons.search, onPressed: () {})],
)
Parameter Type Default Description
title Widget? null Title widget
leading Widget? null Leading widget
actions List<Widget>? null Action buttons
centerTitle bool true Centre the title. iOS 26 puts a bar's principal item in the middle (.principal is centred by default); the bar slides it to the leading edge by itself only when the trailing controls leave no room. Pass false to pin it to the leading edge
largeTitleController GlassLargeTitleController? null Large title controller

SeaGlassTabBar #

Bottom tab bar navigation โ€” the iOS 26 floating capsule. Three shapes, all on the same iOS 26 metrics so a bar cannot come out 104pt tall by accident:

// A pill of tabs, optionally with a trailing island.
SeaGlassTabBar(
  tabs: [
    SeaGlassTab(
      label: 'Home',
      icon: CupertinoIcons.house,
      activeIcon: CupertinoIcons.house_fill,
    ),
    SeaGlassTab(label: 'Files', icon: CupertinoIcons.folder),
    SeaGlassTab(label: 'Settings', icon: CupertinoIcons.gear_alt),
  ],
  selectedIndex: 0,
  onTabSelected: (index) => switchTab(index),
);

// The iOS 26 search bar: tapping the trailing island morphs the pill into a
// search field and collapses the tabs. The results replace the body.
SeaGlassTabBar.searchable(
  tabs: tabs,
  selectedIndex: index,
  onTabSelected: switchTab,
  isSearchActive: searching,
  searchConfig: GlassSearchBarConfig(
    hintText: 'Search',
    onSearchToggle: (active) => setState(() => searching = active),
    onChanged: (q) => setState(() => query = q),
  ),
);

// The scroll behaviour: the pill shrinks to the selected tab while the page
// scrolls and springs back when it stops.
SeaGlassTabBar.minimizable(
  tabs: tabs,
  selectedIndex: index,
  onTabSelected: switchTab,
  minimizeController: minimizeController,   // fed from the page's scroll offset
);
Parameter Type Default Description
tabs List<SeaGlassTab> required Tab definitions
selectedIndex int required Active tab
onTabSelected ValueChanged<int> required Tab tap handler
extraButton GlassTabBarExtraButton? null Trailing island (search, compose)
searchConfig / searchController / isSearchActive โ€” โ€” SeaGlassTabBar.searchable only
minimizeController / isMinimized โ€” โ€” SeaGlassTabBar.minimizable only
selectedIconColor / selectedLabelColor Color? accent Selected tint

Give a tab an activeIcon and iOS marks the selection with the filled glyph against outline glyphs for the rest. Two filled glyphs make the selection read as colour-only, which is the first thing to disappear in a low-contrast glass bar.

The bar is 72pt tall (barHeightPill 56 + 2 ร— 8) โ€” the system's 49โ€“56pt range, floating 8pt above the home indicator. Pages never restate that number: they reserve clearance through SeaInsets / SeaBottomInset, which read the height the bar publishes. SeaGlassTabBar.barHeight exposes the measured value.

SeaSystemUi #

The system chrome style for a fast_sea app: both system bars transparent, with only the icon brightness following the theme.

A page in this library always paints its own background โ€” gradient, glow blobs, whatever SeaApp was given โ€” and everything else floats above it. A status-bar colour of any kind, including Android's own contrast scrim, draws an opaque band across the top of that background and makes the floating navigation bar look like it is sitting under a lid. On iOS the bar has always been transparent, which is why this only ever showed up on Android; it is now set explicitly for both so the two cannot drift.

SeaApp, SeaGlassScaffold and SeaGlassPage install it for you. Reach for it directly only when you draw your own chrome:

AnnotatedRegion<SystemUiOverlayStyle>(
  value: SeaSystemUi.of(context),
  child: child,
);
Member Description
SeaSystemUi.of(context) Transparent style resolved from the theme brightness
SeaSystemUi.resolve(context, style) Transparent style with the icon brightness from a GlassStatusBarStyle
SeaSystemUi.lightIcons / darkIcons The two constant styles

SeaGlassScaffold.statusBarStyle therefore only picks the icon brightness; GlassStatusBarStyle.none means "take it from the theme", not "leave the system alone", because there is always a background behind the bar worth showing.

SeaGlassSegmentedControl #

Segmented control selector:

SeaGlassSegmentedControl(
  labels: ['All', 'Active', 'Done'],
  selectedIndex: _selectedIndex,
  onSegmentSelected: (index) => setState(() => _selectedIndex = index),
)

SeaGlassSwitch #

Toggle switch:

SeaGlassSwitch(
  value: isEnabled,
  onChanged: (value) => setState(() => isEnabled = value),
  activeColor: SeaColors.primary,
)

SeaGlassSlider #

Slider control with glass effect:

SeaGlassSlider(
  value: volume,
  min: 0.0,
  max: 1.0,
  divisions: 10,
  onChanged: (value) => setState(() => volume = value),
)
Parameter Type Default Description
value double required Current value
onChanged ValueChanged<double>? required Value change callback
min double 0.0 Minimum value
max double 1.0 Maximum value
divisions int? null Discrete divisions
label String? null Label above thumb
activeColor Color? SeaColors.primary Active track color
settings LiquidGlassSettings? null Custom glass settings
useOwnLayer bool false Use independent glass layer

SeaGlassBadge #

Notification badge / dot indicator:

// Count badge
SeaGlassBadge(
  count: 5,
  child: Icon(CupertinoIcons.mail),
)

// Dot badge (status indicator)
SeaGlassBadge.dot(
  dotColor: Colors.green,
  child: AvatarWidget(),
)
Parameter Type Default Description
child Widget required Target widget
count int 0 Badge count
position BadgePosition topRight Badge position
backgroundColor Color? SeaColors.danger Badge background
showZero bool false Show when count is 0
maxCount int 99 Max count before "+"

SeaGlassChip #

Filter / tag chip:

SeaGlassChip(
  label: 'Technology',
  icon: Icon(CupertinoIcons.tag),
  selected: true,
  onTap: () => toggleFilter(),
)

SeaGlassChip(
  label: 'Remove',
  onDeleted: () => removeTag(),
)
Parameter Type Default Description
label String required Chip text
icon Widget? null Leading icon
onTap VoidCallback? null Tap handler
onDeleted VoidCallback? null Delete handler (shows X)
selected bool false Selected state
selectedColor Color? SeaColors.primary Selected color
settings LiquidGlassSettings? null Custom glass settings

SeaGlassTextField #

Text input field with glass effect:

SeaGlassTextField(
  placeholder: 'Email',
  prefixIcon: Icon(CupertinoIcons.mail),
  keyboardType: TextInputType.emailAddress,
  onChanged: (value) => updateEmail(value),
)
Parameter Type Default Description
controller TextEditingController? null Text controller
placeholder String? null Placeholder text
prefixIcon Widget? null Leading icon
suffixIcon Widget? null Trailing icon
obscureText bool false Password mode
maxLines int 1 Max lines
enabled bool true Enabled state
onChanged ValueChanged<String>? null Text change callback
onSubmitted ValueChanged<String>? null Submit callback
settings LiquidGlassSettings? null Custom glass settings

SeaGlassSearchBar #

Search bar with glass effect:

SeaGlassSearchBar(
  placeholder: 'Search messages',
  showsCancelButton: true,
  onChanged: (query) => performSearch(query),
  onCancel: () => clearSearch(),
)
Parameter Type Default Description
controller TextEditingController? null Text controller
placeholder String 'Search' Placeholder text
onChanged ValueChanged<String>? null Text change callback
onSubmitted ValueChanged<String>? null Submit callback
onCancel VoidCallback? null Cancel callback
showsCancelButton bool false Show cancel button
autofocus bool false Auto focus
settings LiquidGlassSettings? null Custom glass settings

SeaGlassDivider #

Glass divider line:

SeaGlassDivider()

SeaGlassDivider.vertical(indent: 8, endIndent: 8)
Parameter Type Default Description
thickness double 0.5 Line thickness
indent double 0.0 Leading indent
endIndent double 0.0 Trailing indent
color Color? null Line color
height double? null Divider height
axis Axis horizontal Horizontal or vertical

SeaGlassProgressIndicator #

Circular or linear progress indicator:

// Circular loading spinner
SeaGlassProgressIndicator.circular()

// Circular with progress
SeaGlassProgressIndicator.circular(value: 0.7, size: 40, strokeWidth: 4)

// Linear progress bar
SeaGlassProgressIndicator.linear(value: 0.5)

SeaGlassStepper #

Numeric stepper (+/โˆ’):

SeaGlassStepper(
  value: quantity,
  min: 0,
  max: 99,
  step: 1,
  onChanged: (value) => setState(() => quantity = value),
)
Parameter Type Default Description
value double required Current value
onChanged ValueChanged<double>? required Value change callback
min double 0.0 Minimum value
max double 100.0 Maximum value
step double 1.0 Step increment
wraps bool false Wrap around at bounds
autoRepeat bool true Auto-repeat on hold

SeaGlassPicker #

Picker field that opens a bottom sheet:

SeaGlassPicker(
  value: selectedCategory,
  placeholder: 'Select Category',
  onTap: () => showCategoryPicker(),
)
Parameter Type Default Description
value String? null Selected value text
onTap VoidCallback? null Tap handler
placeholder String 'Select' Placeholder text
icon Widget? null Trailing icon
settings LiquidGlassSettings? null Custom glass settings

SeaGlassToolbar #

Toolbar container for action buttons:

SeaGlassToolbar(
  children: [
    SeaGlassIconButton(icon: CupertinoIcons.bold, onPressed: () {}),
    SeaGlassIconButton(icon: CupertinoIcons.italic, onPressed: () {}),
    SeaGlassIconButton(icon: CupertinoIcons.underline, onPressed: () {}),
  ],
)

SeaGlassButtonGroup #

Segmented icon button group:

SeaGlassButtonGroup(
  children: [
    SeaGlassIconButton(icon: CupertinoIcons.bold, onPressed: () {}),
    SeaGlassIconButton(icon: CupertinoIcons.italic, onPressed: () {}),
    SeaGlassIconButton(icon: CupertinoIcons.underline, onPressed: () {}),
  ],
)
Parameter Type Default Description
children List<Widget> required Button widgets
settings LiquidGlassSettings? null Custom glass settings

SeaGlassContainer #

Generic glass container with customizable radius:

SeaGlassContainer(
  padding: EdgeInsets.all(16),
  borderRadius: 12,
  child: Text('Content'),
)
Parameter Type Default Description
child Widget? null Content widget
padding EdgeInsetsGeometry? null Inner padding
margin EdgeInsetsGeometry? null Outer margin
width double? null Fixed width
height double? null Fixed height
borderRadius double 20 Corner radius
settings LiquidGlassSettings? null Custom glass settings

SeaGlassPageControl #

Dot indicator for PageView:

SeaGlassPageControl(
  count: 4,
  currentPage: _pageIndex,
  onPageChanged: (index) => setState(() => _pageIndex = index),
)
Parameter Type Default Description
count int required Total pages
currentPage int 0 Current page index
onPageChanged ValueChanged<int>? null Page change callback

SeaGlassMaterialize #

Fade-in/out animation wrapper:

SeaGlassMaterialize(
  visible: _isVisible,
  child: SeaGlassCard(child: Text('Content')),
)
Parameter Type Default Description
child Widget required Target widget
visible bool true Visibility state
duration Duration 400ms Animation duration
curve Curve easeInOut Animation curve

SeaGlassNavigationShell #

Glass page transition wrapper:

SeaGlassNavigationShell(
  child: YourContent(),
)
Parameter Type Default Description
child Widget required Content widget

SeaGlassPage #

Glass page with background sampling:

SeaGlassPage(
  child: SafeArea(child: YourContent()),
)
Parameter Type Default Description
child Widget required Page content
statusBarStyle SystemUiOverlayStyle? null Status bar style
navigationBarStyle SystemUiOverlayStyle? null Nav bar style

SeaLiquidGlassScope #

Provides liquid glass scope for child widgets:

SeaLiquidGlassScope(
  child: YourGlassWidgets(),
)
Parameter Type Default Description
child Widget required Child widgets
useOwnLayer bool false Independent glass layer

SeaGlassProgressiveBlur #

Progressive blur overlay:

SeaGlassProgressiveBlur(
  maxSigma: 18,
  direction: BlurDirection.topToBottom,
)
Parameter Type Default Description
maxSigma double 18 Maximum blur sigma
minSigma double 0 Minimum blur sigma
direction BlurDirection topToBottom Blur gradient direction
falloff BlurFalloff linear Blur falloff curve

SeaGlassPasswordField #

Password input with visibility toggle:

SeaGlassPasswordField(
  placeholder: 'Password',
  onChanged: (value) => updatePassword(value),
)
Parameter Type Default Description
controller TextEditingController? null Text controller
placeholder String? null Placeholder text
onChanged ValueChanged<String>? null Text change callback
onSubmitted ValueChanged<String>? null Submit callback
focusNode FocusNode? null Focus node
autofocus bool false Auto focus
enabled bool true Enabled state

SeaGlassFormField #

Labeled form field wrapper:

SeaGlassFormField(
  label: 'Email',
  child: SeaGlassTextField(placeholder: 'Enter email'),
  helperText: "We'll never share your email",
  errorText: hasError ? 'Invalid email' : null,
)
Parameter Type Default Description
child Widget required Input widget
label String? null Field label
helperText String? null Helper text below
errorText String? null Error text (red)

SeaGlassTextArea #

Multiline text input:

SeaGlassTextArea(
  placeholder: 'Write a message...',
  maxLines: 5,
  minLines: 3,
  onChanged: (value) => updateMessage(value),
)
Parameter Type Default Description
controller TextEditingController? null Text controller
placeholder String? null Placeholder text
maxLines int 5 Maximum lines
minLines int 1 Minimum lines
onChanged ValueChanged<String>? null Text change callback
enabled bool true Enabled state

SeaGlassMenu #

Glass popup menu:

SeaGlassMenu(
  trigger: SeaGlassButton(label: 'Menu', onTap: () {}),
  items: [
    SeaGlassMenuItem(icon: Icon(CupertinoIcons.share, size: 16), title: 'Share', onTap: () => share()),
    SeaGlassMenuItem(icon: Icon(CupertinoIcons.copy, size: 16), title: 'Copy', onTap: () => copy()),
    SeaGlassMenuItem(icon: Icon(CupertinoIcons.trash, size: 16), title: 'Delete', isDestructive: true, onTap: () => delete()),
  ],
)
Parameter Type Default Description
trigger Widget? null Trigger widget
items List<Widget> required Menu items
menuAlignment GlassMenuAlignment? null Menu alignment
menuWidth double 200 Menu width

SeaGlassPopover #

Glass popover with flexible content:

SeaGlassPopover(
  trigger: SeaGlassButton(label: 'Open', onTap: () {}),
  contentBuilder: (context) => Padding(
    padding: EdgeInsets.all(16),
    child: Text('Popover content'),
  ),
)
Parameter Type Default Description
trigger Widget required Trigger widget
contentBuilder WidgetBuilder required Content builder
alignment GlassPopoverAlignment? null Popover alignment

SeaGlassPullDownButton #

Pull-down action menu button:

SeaGlassPullDownButton(
  label: 'Actions',
  icon: Icon(CupertinoIcons.ellipsis_circle),
  items: [
    SeaGlassMenuItem(icon: Icon(CupertinoIcons.pencil, size: 16), title: 'Edit', onTap: () => edit()),
    SeaGlassMenuItem(icon: Icon(CupertinoIcons.doc_on_clipboard, size: 16), title: 'Copy', onTap: () => copy()),
  ],
)
Parameter Type Default Description
label String? null Button label
icon Widget? null Button icon
items List<Widget> required Menu items
onSelected ValueChanged<String>? null Selection callback

SeaGlassActionSheet #

Operational choices use a docked bottom glass sheet by default. Select the centred alert-like presentation explicitly when it better fits the context:

showSeaGlassActionSheet(
  context: context,
  title: 'Choose Action',
  message: 'Select an option below',
  actions: [
    SeaGlassActionSheetAction(label: 'Share', onPressed: () => share()),
    SeaGlassActionSheetAction(label: 'Delete', isDestructive: true, onPressed: () => delete()),
  ],
  cancelLabel: 'Cancel',
  barrierDismissible: true,
  // style: SeaActionSheetStyle.centered,
)
Parameter Type Default Description
context BuildContext required Build context
title String? null Sheet title
message String? null Sheet message
actions List<SeaGlassActionSheetAction> required Action items
cancelLabel String 'Cancel' Cancel button text
showCancelButton bool true Show cancel button
barrierDismissible bool true Dismiss on tap outside
style SeaActionSheetStyle bottom bottom is the docked glass sheet; centered is the alert-like alternative

SeaGlassModalSheet #

Modal bottom sheet with a drag handle. By default it sizes to its content, up to the available screen height. To get a fractional-height sheet that can be dragged between detents (useful for media controls and collapsible previews), pass halfSize, initialState, or mode. showSeaGlassSheet is the direct content-sized API.

showSeaGlassModalSheet(
  context: context,
  // Omit detent options for a content-sized sheet.
  builder: (context) => Column(
    mainAxisSize: MainAxisSize.min,
    children: [
      Text('Modal Sheet'),
      Text('This is a glass modal sheet.'),
    ],
  ),
)

To opt into fractional-height detents:

showSeaGlassModalSheet(
  context: context,
  halfSize: 0.45,
  builder: (context) => const NowPlayingPanel(),
)
Parameter Type Default Description
context BuildContext required Build context
builder WidgetBuilder required Sheet content builder
halfSize double? null Fractional-height detent; setting it enables detent mode
initialState GlassSheetState? null Initial detent; setting it enables detent mode
mode GlassSheetMode? null Detent interaction mode; setting it enables detent mode
isDismissible bool true Dismiss by drag/tap outside

SeaGlassBackground #

Gradient background with glow blobs:

// Default background
SeaGlassBackground(child: YourContent())

// Custom gradient
SeaGlassBackground(
  lightGradient: [Color(0xFFE8F5E9), Color(0xFFE3F2FD)],
  darkGradient: [Color(0xFF0D1B0E), Color(0xFF0D1B2A)],
  child: YourContent(),
)

// Custom glow blobs
SeaGlassBackground(
  glowBlobs: [
    SeaGlowBlob(
      top: -100, left: -50, size: 300,
      lightColor: Color(0x4D20BFA9),
      darkColor: Color(0x4720BFA9),
    ),
    SeaGlowBlob(
      bottom: -80, right: -60, size: 280,
      lightColor: Color(0x385856D6),
      darkColor: Color(0x385856D6),
    ),
  ],
  child: YourContent(),
)

SeaGlowBlob #

Glow blob configuration for SeaGlassBackground:

Parameter Type Default Description
top double NaN Top position (NaN = not set)
left double NaN Left position
right double NaN Right position
bottom double NaN Bottom position
size double required Blob diameter
lightColor Color required Color in light mode
darkColor Color required Color in dark mode

Dialogs & Sheets #

SeaGlassDialog #

Glass morphism dialog:

// Custom dialog
SeaGlassDialog.show(
  context: context,
  title: 'Confirm',
  message: 'Are you sure?',
  actions: [
    SeaDialogAction(label: 'Cancel', onPressed: () => Navigator.pop(context)),
    SeaDialogAction(label: 'OK', isPrimary: true, onPressed: () => handleOk()),
  ],
);

// Confirm dialog shortcut
SeaGlassDialog.showConfirm(
  context: context,
  title: 'Delete Item',
  message: 'This action cannot be undone.',
  isDestructive: true,
  onConfirm: () => deleteItem(),
);

SeaGlassSheet #

The glass surface a bottom sheet is drawn on. Docked flush with the bottom edge it keeps its bottom corners square and rounds only the top, at SeaRadius.sheet (28pt); give it a margin that leaves a gap and the bottom corners round themselves.

SeaGlassSheet(
  child: Column(
    children: [
      SeaGlassSheetHeader(title: 'Options'),
      SeaGlassListTile(title: const Text('Option 1'), onTap: () {}),
      SeaGlassListTile(title: const Text('Option 2'), onTap: () {}),
    ],
  ),
)
Parameter Type Default Description
child Widget required Sheet content
topBorderRadius double SeaRadius.sheet Top corner radius
bottomBorderRadius double? null Bottom radius; auto โ€” 0 when docked, rounded when floating
margin EdgeInsetsGeometry 8pt sides + bottom Outer margin
padding EdgeInsetsGeometry? null Content padding, below the drag indicator
showDragIndicator bool true Drag pill at the top
isScrollable bool true Let the content scroll inside the sheet
settings LiquidGlassSettings? null Glass settings for this surface

showSeaGlassSheet(context, builder: ...) pushes the same surface as a route and hands it the drag-to-dismiss behaviour. It sizes to the content (up to the available screen height), so use it for a presented short panel and the widget when you are building the surface yourself. Use showSeaGlassModalSheet when the sheet should rest at and move between fractional-height detents.

showSeaGlassModalSurface #

The route every glass modal in the library is presented through โ€” a centred alert, a dialog, a permission prompt. It resolves the surface with iOS 26's materialize transition instead of fading it.

showSeaGlassModalSurface<void>(
  context: context,
  builder: (context) => MyGlassPanel(),
);
Parameter Type Default Description
context BuildContext required Build context
builder WidgetBuilder required The surface to present
barrierDismissible bool false Dismiss by tapping the dim
barrierLabel String? Cupertino default Accessibility label for the barrier
useRootNavigator bool true Present above the whole app
scaleFrom double 1.12 Scale the surface resolves in from; 1.0 for a full-bleed surface

Use this rather than showCupertinoDialog for anything containing glass. showCupertinoDialog fades its route in, and a backdrop glass pass cannot be faded โ€” the surface spends the fade looking flat and then snaps to glass.


Toast & Loading #

Sea (Unified API) #

Global toast and loading indicators with iOS 27 glass style:

// Loading
Sea.showLoading();
Sea.showLoading('Loading data...');

// Progress
Sea.showProgress(0.5, 'Downloading...');
Sea.isLoadingShowing; // bool

// Toast
Sea.showToast('Hello World');
Sea.showSuccess('Saved successfully');
Sea.showError('Something went wrong');
Sea.showInfo('Tip: swipe to delete');

// Dismiss
Sea.dismiss();

// Check if showing
if (Sea.isLoadingShowing) { ... }

SeaGlassToast #

Glass overlay toast with type indicators:

SeaGlassToast.show(
  context,
  title: 'Success',
  message: 'Data saved successfully',
  type: SeaToastType.success,
  duration: Duration(seconds: 3),
);

// Types: SeaToastType.info, .success, .warning, .danger

Refresh & Pagination #

SeaRefreshWidget #

Pull-down refresh & pull-up load more:

SeaRefreshWidget(
  onRefresh: () async {
    await loadData();
  },
  onLoad: () async {
    final hasMore = await loadMoreData();
    return hasMore;
  },
  noMore: isNoMore,
  child: ListView.builder(
    itemCount: items.length,
    itemBuilder: (context, index) => ItemWidget(items[index]),
  ),
)
Parameter Type Default Description
child Widget? null Scrollable content
onRefresh SeaCallback? null Pull-down refresh callback
onLoad FutureOr<bool> Function()? null Pull-up load more callback
noMore bool false No more data flag
enablePullDown bool true Enable pull-down
controller EasyRefreshController? null External controller
header Header? ClassicHeader() Custom header
footer Footer? ClassicFooter() Custom footer

SeaPageMixin #

Mixin for paginated data loading:

class MyPage extends StatefulWidget {
  @override
  State<MyPage> createState() => _MyPageState();
}

class _MyPageState extends State<MyPage> with SeaPageMixin<Item, MyPage> {
  @override
  int initializePage = 1; // Start from page 1

  @override
  int pageCount = 20; // Items per page

  @override
  Future<List<Item>> loadData(int page) async {
    final response = await api.getItems(page: page, size: pageCount);
    return response.items;
  }

  @override
  Widget build(BuildContext context) {
    if (loading && data.isEmpty) {
      return Center(child: SeaGlassProgressIndicator.circular());
    }
    if (error && data.isEmpty) {
      return Center(child: Text('Error loading data'));
    }
    return SeaRefreshWidget(
      onRefresh: refresh,
      onLoad: loadMore,
      noMore: noMore,
      child: ListView.builder(
        itemCount: data.length,
        itemBuilder: (context, index) => ItemWidget(data[index]),
      ),
    );
  }
}
Property Type Default Description
data List<T> [] Loaded data list
page int 0 Current page
loading bool false Loading state
noMore bool false No more data
error bool false Error state
initializePage int 0 Starting page number
pageCount int 20 Items per page
autoNoMore bool true Auto-detect no more
Method Returns Description
loadData(page) Future<List<T>> Abstract: fetch data for page
refresh() Future<bool> Refresh from first page
loadMore() Future<bool> Load next page
dataAdded(isRefresh) void Override: after data added
onError(e) void Override: handle errors
isNormal bool !error && !loading && data.isNotEmpty
isEmpty bool data.isEmpty

SeaStatusMixin #

Mixin for loading / error / empty three-state page management with built-in iOS 27 glass widgets:

class MyPage extends StatefulWidget {
  @override
  State<MyPage> createState() => _MyPageState();
}

class _MyPageState extends State<MyPage> with SeaStatusMixin<MyPage> {
  late DataModel data;

  @override
  Future<dynamic> loadData() async {
    data = await api.fetchData();
  }

  @override
  bool get empty => data == null;

  @override
  Widget build(BuildContext context) {
    if (!isNormal) return otherWidget; // auto handles loading/error/empty
    return ContentView(data);
  }
}

Built-in widgets (all overridable):

Method Default Description
errorWidget() โš ๏ธ icon + "Something went wrong" + Retry button Error state
emptyWidget() ๐Ÿ“ญ icon + "No data" Empty state
loadingWidget() CupertinoActivityIndicator Loading state
otherWidget Computed from error/empty/loading Auto-selects the right widget
Property Type Description
loading bool Loading state
error bool Error state
empty bool Abstract: is data empty?
isNormal bool !error && !empty && !loading
Method Returns Description
loadData() Future<dynamic> Abstract: fetch data
refresh() Future<void> Reload data
onError(e) void Override: handle errors

Services #

SeaSupabase #

Supabase client wrapper with authentication and database operations:

// Initialize (auto-called by SeaApp with supabaseConfig)
await Sea.supabase.init(
  supabaseUrl: 'https://your-project.supabase.co',
  supabaseAnonKey: 'your-anon-key',
);

// Authentication
await Sea.supabase.signInWithEmail(email: 'user@example.com', password: 'pass');
await Sea.supabase.signUpWithEmail(email: 'user@example.com', password: 'pass');
await Sea.supabase.signInWithApple();
await Sea.supabase.signInWithGoogle();
await Sea.supabase.signInWithGithub();
await Sea.supabase.signOut();
await Sea.supabase.resetPasswordForEmail('user@example.com');
await Sea.supabase.updatePassword('newPassword');

// State
Sea.supabase.isLoggedIn;    // bool
Sea.supabase.currentUser;   // User?
Sea.supabase.userId;        // String?
Sea.supabase.userEmail;     // String?
Sea.supabase.onAuthStateChange; // Stream<AuthState>

// Database
final data = await Sea.supabase.selectAll('users');
final data = await Sea.supabase.selectAll('users', filter: (q) => q.eq('id', '123'));
await Sea.supabase.insert('users', {'name': 'John'});
await Sea.supabase.update('users', {'name': 'Jane'}, column: 'id', value: '123');
await Sea.supabase.delete('users', column: 'id', value: '123');

// Raw client (via SeaSupabase static class)
SeaSupabase.client;  // SupabaseClient
SeaSupabase.auth;    // GoTrueClient
SeaSupabase.storage; // SupabaseStorageClient
SeaSupabase.from('table'); // SupabaseQueryBuilder

SeaAuthPage #

iOS 27-style authentication page with glass morphism:

SeaAuthPage(
  initialMode: SeaAuthMode.login,  // .login, .signUp, .forgotPassword
  showSocialLogin: true,            // Show Apple/Google/GitHub buttons
  showForgotPassword: true,         // Show "Forgot Password?" link
  showSignUp: true,                 // Show "Sign Up" option
  header: Text('Welcome'),          // Custom header widget
  onLoginSuccess: () => navigateHome(),
  onSignUpSuccess: () => navigateHome(),
)
Parameter Type Default Description
initialMode SeaAuthMode login Initial auth mode
showSocialLogin bool true Show OAuth buttons
showForgotPassword bool true Show forgot password
showSignUp bool true Show sign up option
header Widget? null Custom header
onLoginSuccess VoidCallback? null Login success callback
onSignUpSuccess VoidCallback? null Sign up success callback
defaultEmail String Sea.appInfoConfig.defaultEmail Pre-filled email

Sea.dialog.loginDialog() โ€” Centered Dialog Mode #

Show authentication in a centered, scrollable glass dialog with a compact layout. The app icon is omitted in this presentation, and Google, Apple and GitHub sign-in options are arranged horizontally:

// Login dialog
Sea.dialog.loginDialog(context: context);

// Sign up dialog
Sea.dialog.loginDialog(
  context: context,
  initialMode: SeaAuthMode.signUp,
  onLoginSuccess: () => navigateHome(),
);

// Forgot password dialog
Sea.dialog.loginDialog(
  context: context,
  initialMode: SeaAuthMode.forgotPassword,
  showSocialLogin: false,
);
Parameter Type Default Description
context BuildContext required Build context
initialMode SeaAuthMode login Initial auth mode
showSocialLogin bool true Show OAuth buttons
showForgotPassword bool true Show forgot password
showSignUp bool true Show sign up option
onLoginSuccess VoidCallback? null Login success callback
onSignUpSuccess VoidCallback? null Sign up success callback
defaultEmail String Sea.appInfoConfig.defaultEmail Pre-filled email

SeaAuthPage.showDialog(context, ...) remains available as a compatibility entry point and uses the same centered dialog presentation.

SeaGlassAboutPage #

Built-in about page with app info, privacy policy, and user agreement links:

// Default โ€” uses SeaAppInfoConfig
Navigator.push(context, CupertinoPageRoute(
  builder: (_) => const SeaGlassAboutPage(),
));

// Custom
Navigator.push(context, CupertinoPageRoute(
  builder: (_) => SeaGlassAboutPage(
    appName: 'My App',
    version: '2.0.0',
    buildNumber: '42',
    copyright: 'ยฉ 2026 My Company',
    extraSections: [myCustomSection],
  ),
));
Parameter Type Default Description
appName String? Sea.appInfoConfig.appName ?? Sea.appTitle App name
version String? Sea.device.fullVersion Version string
buildNumber String? Sea.device.buildNumber Build number
copyright String? ยฉ year Sea.appTitle Copyright text
extraSections List<Widget>? null Additional sections

Features:

  • Shows app icon from SeaAppInfoConfig.appIconPath, with a default app glyph when no icon asset is configured or the asset cannot load
  • Displays device model, OS version
  • Displays and opens the configured contact email
  • Privacy Policy link โ†’ opens in SeaWebView
  • User Agreement link โ†’ opens in SeaWebView

SeaAppIcon #

Use the app icon configured once in SeaAppInfoConfig anywhere in the app:

// Configure the app icon once:
const appInfo = SeaAppInfoConfig(
  appName: 'My App',
  appIconPath: 'assets/icon/app_icon.png',
);

// Reuse it wherever the app identity is displayed:
const SeaAppIcon(size: 72);

Pass the same configuration to SeaApp:

SeaApp(
  appInfoConfig: appInfo,
  home: const HomePage(),
)

SeaAppIcon uses the configured asset and falls back to the native app glyph if the path is missing or the image fails to load.

SeaWebView #

iOS-style WebView browser component with navigation controls, a smoothed loading progress bar, and a share button that opens the platform's native share sheet for the current page URL:

SeaWebView(
  initialUrl: 'https://www.apple.com',
  title: 'Apple',
  showAppBar: true,
  showProgressBar: true,
  javaScriptMode: {JavaScriptMode.unrestricted},
  onUrlChanged: (url) => print('URL: $url'),
  onTitleChanged: (title) => print('Title: $title'),
  onProgress: (progress) => print('Progress: $progress%'),
  onPageFinished: (url) => print('Loaded: $url'),
  onError: (error) => print('Error: $error'),
)
Parameter Type Default Description
initialUrl String required Initial URL to load
title String? null Page title override
showAppBar bool true Show navigation bar
showProgressBar bool true Show loading progress bar
javaScriptMode Set<JavaScriptMode> {unrestricted} JavaScript mode
onUrlChanged ValueChanged<String>? null URL change callback
onTitleChanged ValueChanged<String>? null Title change callback
onProgress ValueChanged<int>? null Progress callback (0-100)
onError ValueChanged<WebResourceError>? null Error callback
onPageStarted ValueChanged<String>? null Page load started
onPageFinished ValueChanged<String>? null Page load finished
allowedNavigation List<String> [] Allowed navigation domains
loadingWidget Widget? null Custom loading widget
errorWidget Widget? null Custom error widget

SeaAnalytics #

Firebase Analytics wrapper:

// Initialize (auto-called by SeaApp with firebaseConfig)
await Sea.analytics.init();

// Log events
Sea.analytics.logEvent(name: 'button_click', parameters: {'button': 'submit'});
Sea.analytics.logScreenView(screenName: 'HomePage');
Sea.analytics.setUserId(id: 'user-123');
Sea.analytics.setUserProperty(name: 'plan', value: 'premium');

// State
Sea.analytics.isInitialized; // bool

SeaLog #

Debug logging with toggle:

Sea.log.d('Debug message');
Sea.log.i('Info message');
Sea.log.w('Warning message');
Sea.log.e('Error message');
Sea.log.isEnabled; // bool

SeaDevice #

Device information retrieval:

// Initialize (auto-called by SeaApp with servicesConfig.autoInitDevice)
await Sea.device.init();

Sea.device.deviceModel;   // 'iPhone 15 Pro'
Sea.device.osVersion;     // '17.0'
Sea.device.manufacturer;  // 'Apple'
Sea.device.appName;       // 'MyApp'
Sea.device.fullVersion;   // '1.0.0+1'
Sea.device.isInitialized; // bool

SeaStorage #

Local key-value storage (SharedPreferences):

// Initialize (auto-called by SeaApp with servicesConfig.autoInitStorage)
await Sea.storage.init();

Sea.storage.setString('key', 'value');
Sea.storage.getString('key');        // 'value'
Sea.storage.setInt('count', 42);
Sea.storage.getInt('count');         // 42
Sea.storage.setBool('dark', true);
Sea.storage.getBool('dark');         // true
Sea.storage.remove('key');
Sea.storage.containsKey('key');      // Future<bool>
Sea.storage.isInitialized;           // bool

SeaHttp #

HTTP client wrapper (Dio):

// Initialize
Sea.http.init(baseUrl: 'https://api.example.com', headers: {'Authorization': 'Bearer $token'});

// Requests
final data = await Sea.http.requestGet<List<User>>('/users', fromJson: (json) => (json as List).map(User.fromJson).toList());
final result = await Sea.http.requestPost('/users', data: {'name': 'John'});
Sea.http.isInitialized; // bool

SeaConnectivity #

Network connectivity monitoring:

final online = await Sea.connectivity.isOnline;   // bool
final wifi = await Sea.connectivity.isWifi;       // bool
final mobile = await Sea.connectivity.isMobile;   // bool

SeaPermission #

Permission handling:

await Sea.permission.camera();
await Sea.permission.photos();
await Sea.permission.location();
await Sea.permission.notification();
await Sea.permission.requestIfNeeded(Permission.camera);
await Sea.permission.openSettings();

SeaRating #

In-app review/rating:

await Sea.rating.requestReview();

Ads #

SeaAdsWidget #

Google Mobile Ads integration (Banner, Interstitial, Rewarded, AppOpen):

// Define provider
final provider = (
  removeAds: isPremium,
  googleBannerKey: 'ca-app-pub-xxx/yyy',
  googleAppOpenKey: 'ca-app-pub-xxx/yyy',
  googleRewardKey: 'ca-app-pub-xxx/yyy',
  googlePageKey: 'ca-app-pub-xxx/yyy',
  refresh: () => setState(() {}),
);

// Initialize (in main or initState)
await SeaAdsWidget.init(provider);

// Banner ad widget
SeaAdsWidget(provider: provider)

// Rewarded ad
SeaAdsWidget.loadRewardAd(
  context,
  provider,
  onReward: () => grantReward(),
);

// Interstitial ad
SeaAdsWidget.loadPageAd(
  context,
  provider,
  onClosed: () => navigateNext(),
);

// App Open ad
SeaAdsWidget.loadAppOpenAd(
  provider,
  onClose: () => continueApp(),
);

SeaAdsProvider #

Record type for ad configuration:

typedef SeaAdsProvider = ({
  bool removeAds,           // Hide all ads (e.g. premium user)
  String googleBannerKey,   // Banner ad unit ID
  String googleAppOpenKey,  // App Open ad unit ID
  String googleRewardKey,   // Rewarded ad unit ID
  String googlePageKey,     // Interstitial ad unit ID
  void Function() refresh,  // State refresh callback
});

Full API Reference #

Component Wraps Category
SeaApp โ€” Core
Sea theme, log, device, storage, http, connectivity, permission, rating, analytics, supabase, file, dialog, format, validators, inputFormatters, clipboard, haptics, url, config, isReady, servicesReady, loadingTask<T>() Core
SeaConfig instance, maybeInstance Core
SeaAppInfoConfig appName, appIconPath, privacyPolicyUrl, userAgreementUrl, defaultEmail Core
SeaThemeController to, toggle(), setLight(), setDark(), setSystem() Core
SeaColors โ€” Theme
SeaColorScheme โ€” Theme
SeaTextStyles โ€” Theme
SeaGlassStyle LiquidGlassSettings Theme
SeaGlassTheme GlassThemeData Theme
SeaGlassBackground โ€” Layout
SeaGlowBlob โ€” Layout
SeaGlassScaffold GlassScaffold Layout
SeaGlassNavigationBar GlassAppBar Navigation
SeaGlassNavBarLargeTitle GlassLargeTitle Navigation
SeaGlassTabBar GlassTabBar Navigation
SeaGlassNavigationShell GlassNavigationShell Navigation
SeaGlassCard GlassCard Container
SeaGlassSection GlassGroupedSection Container
SeaGlassListTile GlassListTile Container
SeaGlassDivider GlassDivider Container
SeaGlassContainer GlassContainer Container
SeaGlassPage GlassPage Container
SeaLiquidGlassScope LiquidGlassScope Container
SeaGlassProgressiveBlur GlassProgressiveBlur Container
SeaGlassButton GlassButton Interactive
SeaGlassIconButton GlassIconButton Interactive
SeaGlassButtonGroup GlassButtonGroup Interactive
SeaGlassSegmentedControl GlassSegmentedControl Interactive
SeaGlassSwitch GlassSwitch Interactive
SeaGlassSlider GlassSlider Interactive
SeaGlassBadge GlassBadge Interactive
SeaGlassChip GlassChip Interactive
SeaGlassStepper GlassStepper Interactive
SeaGlassToolbar GlassToolbar Interactive
SeaGlassPageControl GlassPageControl Interactive
SeaGlassMaterialize GlassMaterialize Interactive
SeaGlassTextField GlassTextField Input
SeaGlassSearchBar GlassSearchBar Input
SeaGlassPicker GlassPicker Input
SeaGlassPasswordField GlassPasswordField Input
SeaGlassFormField GlassFormField Input
SeaGlassTextArea GlassTextArea Input
SeaGlassProgressIndicator GlassProgressIndicator Feedback
SeaGlassDialog GlassDialog Overlay
SeaGlassSheet GlassSheet Overlay
SeaGlassActionSheet GlassActionSheet Overlay
SeaGlassModalSheet GlassModalSheet Overlay
SeaGlassMenu GlassMenu Overlay
SeaGlassPopover GlassPopover Overlay
SeaGlassPullDownButton GlassPullDownButton Overlay
SeaGlassSheetHeader โ€” Overlay
SeaGlassToast GlassContainer Overlay
SeaHUD EasyLoading (legacy, use Sea) Feedback
SeaRefreshWidget EasyRefresh Refresh
SeaAdsWidget google_mobile_ads Ads
SeaSupabase supabase_flutter Auth & Database
SeaAuthPage โ€” Auth UI
SeaGlassAboutPage โ€” About Page
SeaWebView webview_flutter WebView
SeaAnalytics firebase_analytics Analytics
SeaLog โ€” Services
SeaDevice device_info_plus Services
SeaStorage shared_preferences Services
SeaHttp dio Services
SeaConnectivity connectivity_plus Services
SeaPermission permission_handler Services
SeaRating in_app_review Services
SeaPageMixin โ€” Mixin
SeaStatusMixin โ€” Mixin

Dependencies #

Package Version Purpose
liquid_glass_widgets ^1.3.0 Glass morphism widgets
get ^4.7.3 State management & navigation
easy_refresh ^3.4.0 Pull refresh / load more
flutter_easyloading ^4.0.2 Toast & loading indicators
google_mobile_ads ^9.1.0 Google ads SDK
app_tracking_transparency ^2.0.6 iOS ATT permission
flutter_fgbg ^0.8.0 Foreground/background events
supabase_flutter ^2.8.0 Supabase auth & database
firebase_core ^3.13.0 Firebase core
firebase_analytics ^11.6.0 Firebase analytics
dio ^5.8.0 HTTP client
shared_preferences ^2.5.3 Local storage
device_info_plus ^11.4.0 Device information
connectivity_plus ^6.1.4 Network connectivity
permission_handler ^11.3.1 Runtime permissions
in_app_review ^2.0.9 In-app rating
package_info_plus ^8.3.0 Package info
webview_flutter ^4.10.0 In-app browser WebView

Requirements #

  • Flutter >= 3.10.0
  • Dart >= 3.7.2
  • iOS 12+ / Android API 21+