Skip to main content
Glama
apiPatterns.js1.28 kB
export const flutterAPIPatterns = { deprecated: { widgets: { 'FlatButton': 'TextButton', 'RaisedButton': 'ElevatedButton', 'OutlineButton': 'OutlinedButton', 'ButtonTheme': 'TextButtonTheme/ElevatedButtonTheme', }, methods: { 'overflow': 'clipBehavior', 'disabledElevation': 'Deprecated in Material 3', 'highlightElevation': 'Deprecated in Material 3', }, }, patterns: { navigation: { correct: 'Navigator.of(context).push', incorrect: 'Navigator.push', reason: 'Use Navigator.of(context) for better context handling', }, mediaQuery: { correct: 'MediaQuery.maybeOf(context)', incorrect: 'MediaQuery.of(context)', reason: 'maybeOf prevents crashes when MediaQuery is not available', }, theme: { correct: 'Theme.of(context).colorScheme', incorrect: 'Theme.of(context).accentColor', reason: 'accentColor is deprecated, use colorScheme', }, }, requirements: { 'Scaffold': ['Must have body or appBar', 'Should not be nested'], 'Column': ['Children in Expanded/Flexible when in bounded height'], 'Row': ['Children in Expanded/Flexible when in bounded width'], 'Stack': ['At least one Positioned child for proper layout'], }, };

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/dvillegastech/flutter_mcp_2'

If you have feedback or need assistance with the MCP directory API, please join our Discord server