Migraciones de flutter antiguo a nuevo

Flatbutton



- Flatbutton se cambia por Textbutton. Tiene propiedad textColor que habría que cambiar por alguna de TextButton. Por ejemplo:

style: TextButton.styleFrom(foregroundColor: Theme.of(context).iconTheme.color),

Textheme



- Textheme. Cambiar

headline->headline1

body1->bodyText1

body2->bodyText2

title->subtitle1

subhead->subtitle2

Nueva migración Texttheme:

    labelSmall
      displayLarge
   
    headline1
      displayMedium
   
    headline2
      displaySmall
   
    headline3
      headlineMedium
   
    headline4
      headlineSmall
   
    headline5
      titleLarge
   
    headline6
      titleMedium
   
    subtitle1
      titleSmall
   
    subtitle2
      bodyLarge
   
    bodyText1
      bodyMedium
   
    bodyText2
      bodySmall
   
    caption
      labelLarge
   
    button
      labelSmall
   

RaisedButton

Se cambia por ElevatedButton



SnackBar

Se cambia

scaffoldKey.currentState!.showSnackBar(SnackBar(
por
ScaffoldMessenger.of(context).showSnackBar(SnackBar(









Comentarios

Entradas populares de este blog

Solución a XMLHttpRequest Error en Flutter

Instalar y configurar Kodi

VSCode no encuentra mi propio modulo python