pizzacorn_ui
library
Functions
BestOnColor (Color bg )
→ Color
ConfigurePizzacornColors ({Color ? background , Color ? backgroundSecondary , Color ? backgroundTerciary , Color ? accent , Color ? accent2 , Color ? accentOpacity , Color ? accentPressed , Color ? accentHover , Color ? accentObscure , Color ? alerts , Color ? accentSecondary , Color ? accentSecondaryPressed , Color ? accentSecondaryHover , Color ? textDisable , Color ? backgroundDisable , Color ? subtextPast , Color ? text , Color ? subtext , Color ? textButtons , Color ? textBlocked , Color ? backgroundBlocked , Color ? textfields , Color ? border , Color ? borderFocus , Color ? borderNoFocus , Color ? filter , Color ? shadow , Color ? error , Color ? alert , Color ? done , Color ? info , Color ? divider , double ? radius , double ? sizeBorder , double ? sizeBorderFocus , double ? marginDouble })
→ void
Función para configurar los colores/tokens al inicio de la app.
ContrastRatio (Color a , Color b )
→ double
Contraste WCAG 2.1: (L1 + 0.05) / (L2 + 0.05)
getStyleCustom (double size , FontWeight weight , Color color , {double letterspacing = 0 , bool shadow = false , bool underlined = false , double height = 1.2 })
→ TextStyle
=================== BASES DE ESTILO ===================
getStyleSecondaryCustom (double size , FontWeight weight , Color color , {double letterspacing = 0 , bool shadow = false , bool underlined = false , double height = 1.2 })
→ TextStyle
GoBack ()
→ void
Hace pop de la ruta actual si es posible (equivalente a Navigator.pop()).
GoTo (Widget page , {dynamic onBack ()? })
→ void
Navega a una nueva página manteniendo la pantalla anterior en el stack.
page es el widget de destino.
onBack se ejecuta cuando se hace pop y se vuelve a la pantalla anterior.
GoToClear (Widget page , {dynamic onBack ()? })
→ void
Navega a una nueva página y limpia por completo el histórico de navegación.
Ideal para flujos de login → home.
page es el widget de destino.
onBack se ejecuta cuando esa página se cierre (si se llega a cerrar).
GoToNoBack (Widget page , {dynamic onBack ()? })
→ void
Navega a una nueva página reemplazando la actual (no se puede volver atrás).
page es el widget de destino.
onBack se ejecuta cuando esa página se cierra (por ejemplo, con otro GoBack()).
OpenBottomNoBack (Widget widget , dynamic onBack ()? )
→ Future <void >
Abre un BottomSheet que NO se puede cerrar ni arrastrando ni con el
botón de atrás del sistema.
OpenBottomSheet (Widget widget , {bool noBarrierColor = false , bool disableDrag = false , dynamic onBack ()? })
→ Future <void >
OpenDialog (Widget widget , {dynamic onBack ()? })
→ Future <void >
Abre un diálogo estándar usando el widget que le pases.
OpenSnackbar ({String text = "" , Color ? color })
→ void
Muestra un Snackbar Pizzacorn™ con ícono automático.
PizzacornTheme ()
→ ThemeData
THEME ///////////////////////////////////////////////////////////////////////
Space (double space )
→ Widget
Widget de espacio Pizzacorn.
styleBig ({Color ? color , FontWeight ? fontWeight , double ? fontSize , double letterspacing = 0 , bool shadow = false , double height = 1.2 })
→ TextStyle
=================== ESTILOS ===================
styleBody ({Color ? color , FontWeight ? fontWeight , double ? size , bool shadow = false , double height = 1.2 })
→ TextStyle
styleButton ({Color ? color , FontWeight ? fontWeight , double ? size , double height = 1.2 })
→ TextStyle
styleCaption ({Color ? color , FontWeight ? fontWeight , double ? size , double height = 1.2 })
→ TextStyle
styleSmall ({Color ? color , FontWeight ? fontWeight , double ? size , double height = 1.2 })
→ TextStyle
styleSubtitle ({Color ? color , FontWeight ? fontWeight , double ? size , double height = 1.2 })
→ TextStyle
styleTitle ({Color ? color , FontWeight ? fontWeight , double ? size , double height = 1.2 })
→ TextStyle
TextBig (String text , {double ? fontSize , Color ? color , bool shadow = false , FontWeight ? fontWeight , TextAlign textAlign = TextAlign.start , int maxlines = MAXLINES , TextOverflow textOverflow = TextOverflow.ellipsis , double espacioLetras = 0 , bool isUppercase = true })
→ Widget
=================== WIDGETS ===================
TextBody (String texto , {double ? fontSize , Color ? color , bool shadow = false , FontWeight ? fontWeight , TextAlign textAlign = TextAlign.start , int ? maxlines , TextOverflow textOverflow = TextOverflow.ellipsis , double espacioLetras = 0 , bool isUppercase = false , double height = 1.2 })
→ Widget
TextButtonCustom (String texto , {double ? fontSize , bool shadow = false , Color ? color , FontWeight ? fontWeight , TextAlign textAlign = TextAlign.start , int maxlines = MAXLINES , TextOverflow textOverflow = TextOverflow.ellipsis , double espacioLetras = 0 , bool isUppercase = false })
→ Widget
TextCaption (String texto , {double ? fontSize , Color ? color , bool shadow = false , FontWeight ? fontWeight , TextAlign textAlign = TextAlign.start , int maxlines = MAXLINES , TextOverflow textOverflow = TextOverflow.ellipsis , double espacioLetras = 0 , bool isUppercase = false })
→ Widget
TextCustom (String texto , {double ? fontSize , bool shadow = false , Color ? color , FontWeight ? fontWeight , TextAlign textAlign = TextAlign.start , int maxlines = MAXLINES , TextOverflow textOverflow = TextOverflow.ellipsis , double espacioLetras = 0 , double height = 1 , bool isUppercase = false })
→ Widget
TextSmall (String texto , {double ? fontSize , Color ? color , bool shadow = false , FontWeight ? fontWeight , TextAlign textAlign = TextAlign.start , int maxlines = MAXLINES , TextOverflow textOverflow = TextOverflow.ellipsis , double espacioLetras = 0 , bool isUppercase = false })
→ Widget
TextSubtitle (String text , {double ? fontSize , Color ? color , bool shadow = false , FontWeight ? fontWeight , TextAlign textAlign = TextAlign.start , int maxlines = MAXLINES , TextOverflow textOverflow = TextOverflow.ellipsis , double espacioLetras = 0 , bool isUppercase = true , double height = 1.2 })
→ Widget
TextTitle (String text , {double ? fontSize , Color ? color , bool shadow = false , FontWeight ? fontWeight , TextAlign textAlign = TextAlign.start , int maxlines = MAXLINES , TextOverflow textOverflow = TextOverflow.ellipsis , double espacioLetras = 0 , bool isUppercase = true , double height = 1.2 })
→ Widget