AntigravityList
Rules

AntigravityList

The ultimate directory for the Antigravity ecosystem. Discover tools, resources, and more.

Directory

RulesSitemap

Support

Help CenterPrivacy PolicyRefund PolicyTerms of ServiceAbout Us

© 2025 AntigravityList. All rights reserved.

This website is not affiliated with, endorsed by, or associated with Google LLC. "Google" and "Antigravity" are trademarks of Google LLC.

Browse Rules

Libraries

26
26
17
14
14
8
7
6
6
6
5
5
5
5
5
4
4
4
4
4
4
4
4
4
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1

Showing 2 rules (Total 2)

Flutter + Bloc Cubit & Firebase AI Rules
You are an expert in Flutter, Dart, Bloc, Freezed, Flutter Hooks, and Firebase. Key Principles - Write concise, technical Dart code with accurate examples. - Use functional and declarative programming patterns where appropriate. - Prefer composition over inheritance. - Use descriptive variable names with auxiliary verbs (e.g., isLoading, hasError). - Structure files: exported widget, subwidgets, helpers, static content, types. Dart/Flutter - Use const constructors for immutable widgets. - Leverage Freezed for immutable state classes and unions. - Use arrow syntax for simple functions and methods. - Prefer expression bodies for one-line getters and setters. - Use trailing commas for better formatting and diffs. Error Handling and Validation - Implement error handling in views using SelectableText.rich instead of SnackBars. - Display errors in SelectableText.rich with red color for visibility. - Handle empty states within the displaying screen. - Manage error handling and loading states within Cubit states. Bloc-Specific Guidelines - Use Cubit for managing simple state and Bloc for complex event-driven state management. - Extend states with Freezed for immutability. - Use descriptive and meaningful event names for Bloc. - Handle state transitions and side effects in Bloc's mapEventToState. - Prefer context.read() or context.watch() for accessing Cubit/Bloc states in widgets. Firebase Integration Guidelines - Use Firebase Authentication for user sign-in, sign-up, and password management. - Integrate Firestore for real-time database interactions with structured and normalized data. - Implement Firebase Storage for file uploads and downloads with proper error handling. - Use Firebase Analytics for tracking user behavior and app performance. - Handle Firebase exceptions with detailed error messages and appropriate logging. - Secure database rules in Firestore and Storage based on user roles and permissions. Performance Optimization - Use const widgets where possible to optimize rebuilds. - Implement list view optimizations (e.g., ListView.builder). - Use AssetImage for static images and cached_network_image for remote images. - Optimize Firebase queries by using indexes and limiting query results. Key Conventions 1. Use GoRouter or auto_route for navigation and deep linking. 2. Optimize for Flutter performance metrics (first meaningful paint, time to interactive). 3. Prefer stateless widgets: - Use BlocBuilder for widgets that depend on Cubit/Bloc state. - Use BlocListener for handling side effects, such as navigation or showing dialogs. UI and Styling - Use Flutter's built-in widgets and create custom widgets. - Implement responsive design using LayoutBuilder or MediaQuery. - Use themes for consistent styling across the app. - Use Theme.of(context).textTheme.titleLarge instead of headline6, and headlineSmall instead of headline5 etc. Model and Database Conventions - Include createdAt, updatedAt, and isDeleted fields in Firestore documents. - Use @JsonSerializable(fieldRename: FieldRename.snake) for models. - Implement @JsonKey(includeFromJson: true, includeToJson: false) for read-only fields. Widgets and UI Components - Create small, private widget classes instead of methods like Widget _build.... - Implement RefreshIndicator for pull-to-refresh functionality. - In TextFields, set appropriate textCapitalization, keyboardType, and textInputAction. - Always include an errorBuilder when using Image.network. Miscellaneous - Use log instead of print for debugging. - Use BlocObserver for monitoring state transitions during debugging. - Keep lines no longer than 80 characters, adding commas before closing brackets for multi-parameter functions. - Use @JsonValue(int) for enums that go to the database. Code Generation - Utilize build_runner for generating code from annotations (Freezed, JSON serialization). - Run flutter pub run build_runner build --delete-conflicting-outputs after modifying annotated classes. Documentation - Document complex logic and non-obvious code decisions. - Follow official Flutter, Bloc, and Firebase documentation for best practices. Refer to Flutter, Bloc, and Firebase documentation for Widgets, State Management, and Backend Integration best practices.
BlocCubit+4
Angular Ionic Firebase Firestore Antigravity Rules
You are an expert in Ionic, Cordova, and Firebase Firestore, Working with Typescript and Angular building apps for mobile and web. Project Structure and File Naming - Organize by feature directories (e.g., 'services/', 'components/', 'pipes/') - Use environment variables for different stages (development, staging, production) - Create build scripts for bundling and deployment - Implement CI/CD pipeline - Set up staging and canary environments - Structure Firestore collections logically (e.g., 'users/', 'spots/', 'bookings/') - Maintain Firebase configurations for different environments ## Project Structure and Organization - Use descriptive names for variables and functions (e.g 'getUsers', 'calculateTotalPrice'). - Keep classes small and focused. - Avoid global state when possible. - Manage routing through a dedicated module - Use the latest ES6+ features and best practices for Typescript and Angular. - Centralize API calls and error handling through services - Manage all storage through single point of entry and retrievals. Also put storage keys at single to check and find. - Create dedicated Firebase services for each collection type - Implement Firebase error handling in a centralized service - Use Firebase transactions for data consistency - Use Firebase rules for data security - Use Firebase functions for serverless backend logic - Use Firebase storage for file uploads and downloads - Use Firebase authentication for user management - Use Firebase analytics for tracking user behavior - Use Firebase crash reporting for error tracking - Structure Firestore queries for optimal performance ## Naming Conventions - camelCase: functions, variables (e.g., `getUsers`, `totalPrice`) - kebab-case: file names (e.g., `user-service.ts`, `home-component.ts`) - PascalCase: classes (e.g., `UserService`) - Booleans: use prefixes like 'should', 'has', 'is' (e.g., `shouldLoadData`, `isLoading`). - UPPERCASE: constants and global variables (e.g., `API_URL`, `APP_VERSION`). - Firestore collections: plural nouns (e.g., `users`, `bookings`). - Firestore documents: descriptive IDs (e.g., `user-${uid}`, `booking-${timestamp}`). ## Dependencies and Frameworks - Avoid using any external frameworks or libraries unless its absolutely required. - Use native plugins through Ionic Native wrappers with proper fallbacks for a smooth user experience in both web and native platforms. - While choosing any external dependency, check for the following things: - Device compatibility - Active maintenance - Security - Documentation - Ease of integration and upgrade - Use native components for both mobile and web if available and fullfill the requirements. - If any native plugin is being used for andriod or ios, it should be handled in a centralized service and should not be used directly in the component. - Use official Firebase SDKs and AngularFire for Firestore integration. - Implement proper Firebase initialization and configuration. - Handle Firebase Authentication properly. - Set up appropriate Firebase Security Rules. ## UI and Styles - Prefer Ionic components. - Create reusable components for complex UI. - Use SCSS for styling. - Centralize themes, colors, and fonts. - Implement loading states for Firebase operations. - Handle Firebase offline data gracefully. - Show appropriate error messages for Firebase operations. - Implement real-time UI updates with Firebase snapshots. ## Performance and Optimization - Implement lazy loading. - Use pre-fetching for critical data. - Use caching for all the data that is needed multiple times. - Use global error and alert handlers. - Integrate any crash reporting service for the application. - Use a centralised alert handler to handle all the alert in the application. - Implement Firebase offline persistence. - Use Firebase query Antigravitys for pagination. - Optimize Firestore reads with proper indexing. - Cache Firestore query results. - Use Firestore batch operations for bulk updates. - Monitor Firestore quota usage. ## Testing - Write comprehensive unit tests - Make sure to cover all the edge cases and scenarios. - In case of Native plugins, write mock services for the same. - Test Firebase integration thoroughly - Mock Firestore services in tests - Test Firebase security rules - Implement Firebase emulator for testing - Test offline functionality - Verify Firebase error handling Follow the official Ionic/Angular and Firebase/Firestore guides for best practices.
angularcordova+3