Buscar pacotes, repositórios e categorias de apps

Capa de magnifying_glass
Detalhes do pacotev2.1.1

magnifying_glass

Widget de lente de aumento em tempo real com distorção de barril/pincushion no Flutter.

AndroidiOSWebmacOSWindowsLinux
Downloads em 30 dias
79
Curtidas
52
Pontos Pub
150

Instalar pacote

flutter pub add magnifying_glass

Visão geral do pacote

Orientação gerada a partir de informações públicas. Apenas para referência.

O pacote magnifying_glass fornece um widget de lente de aumento em tempo real para o Flutter, com efeitos dinâmicos de distorção barril e almofada. Permite zoom interativo em qualquer conteúdo, ideal para inspeção detalhada em aplicativos como visualizadores de imagens, ferramentas educacionais ou recursos de acessibilidade. O widget utiliza shaders para desempenho suave em todas as plataformas, incluindo móvel, web e desktop. Integra-se perfeitamente em interfaces existentes com controle personalizável do tamanho da lente, nível de zoom e posição.

Casos de uso

  • Inspeção interativa de imagem
  • Melhorias de acessibilidade
  • Detalhes do aplicativo educacional
  • Ferramentas de arte digital
  • Zoom do detalhe do produto
  • Melhoria na legibilidade do texto

Principais recursos

  • Zoom em tempo real com rastreamento de toque
  • Efeitos de distorção barril e almofada
  • Renderização baseada em shader para desempenho
  • Suporte multiplataforma (Android, iOS, Web, macOS, Windows, Linux)
  • Tamanho da lente e nível de zoom personalizáveis
  • Interação suave e responsiva

Indicado para

  • Desenvolvedores de aplicativos em busca de recursos interativos de zoom
  • Aplicações voltadas para acessibilidade
  • Ferramentas de design e prototipagem
  • Software educacional
  • Utilitários de edição de imagem

Considerações

  • Uso mais alto de GPU com fundos complexos
  • Pode exigir otimização em dispositivos de baixa potência
  • Limitado à ampliação visual sem extração de texto
  • Não adequado para tarefas de medição de alta precisão
  • O desempenho depende da eficiência do shader

README original

Snapshot do README original do repositório-fonte vinculado. Consulte o repositório para o conteúdo mais recente.

MagnifyingGlass Flutter plugin

Flutter real-time magnifying glass lens widget with Barrel/Pincushion distortion.

Screenshot

Buy Me A Coffee

Getting Started

Make [MagnifyingGlass] widget as the parent of the widget you wish to be used (usually MyHomePage).

    @override
    Widget build(BuildContext context) {
    MagnifyingGlassController magnifyingGlassController = MagnifyingGlassController();
    return MagnifyingGlass(
      controller: magnifyingGlassController,
      glassPosition: GlassPosition.touchPosition,
      borderThickness: 8.0,
      borderColor: Colors.grey,
      glassParams: GlassParams(
        startingPosition: Offset(150, 150),
        diameter: 150,
        distortion: 1.0,
        magnification: 1.2,
        padding: EdgeInsets.all(10),
      ),
      child: Scaffold( 
        body: ...,

        floatingActionButton: FloatingActionButton(
          onPressed: () => magnifyingGlassController.openGlass(),
          child: const Icon(Icons.search),
        ),
      )
    );

MagnifyingGlass properties

Name Type Description
controller MagnifyingGlassController Let you control the glass state and parameters:
openGlass()
closeGlass()
setDistortion( double distortion, double magnification )
setDiameter( int diameter )
refresh()
glassPosition enum enum to set the touch behavior or sticky position
glassParams GlassParams class to set lens parameters
borderColor Color border color
borderThickness double border thickness
elevation double shadow elevation
shadowOffset Offset shadow offset

GlassPosition class

Name Description
touchPosition move the glass with finger touch
topLeft sticky position to top left corner of the screen
topRight sticky position to top rigth corner of the screen
bottomLeft sticky position to bottom left corner of the screen
bottomRight sticky position to bottom right corner of the screen

GlassParams class

Name Description
startingPosition the startin glass position. If not given the lens will be placed at the center of the screen.
diameter the diameter of the glass
magnification the magnification of the lens
1 means no magnification
>1 means magnification
<1 means shrinking
distortion Barrel/Pincushion distortion power
0 means no distortion
padding the padding surrounding the glass to enlarge touching area
distorsion0.5-mag1.0.png distorsion0.5-mag1.4.png distorsion2.0-mag1.7.png
distorsion 0.5
mag 1.0
distorsion 0.5
mag 1.4
distorsion 2.0
mag 1.7

Categorias

Repositório-fonte

Projetos que usam este pacote

Ainda não há dados.