惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

宝玉的分享
宝玉的分享
小众软件
小众软件
J
Java Code Geeks
I
InfoQ
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
腾讯CDC
L
LangChain Blog
博客园 - 司徒正美
量子位
Y
Y Combinator Blog
C
Check Point Blog
T
Tailwind CSS Blog
D
DataBreaches.Net
Blog — PlanetScale
Blog — PlanetScale
N
Netflix TechBlog - Medium
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
F
Fortinet All Blogs
云风的 BLOG
云风的 BLOG
A
About on SuperTechFans
B
Blog RSS Feed
酷 壳 – CoolShell
酷 壳 – CoolShell
大猫的无限游戏
大猫的无限游戏
V
V2EX
阮一峰的网络日志
阮一峰的网络日志

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Wind 1.1.0: a Flutter text field with no MaterialApp
Anılcan Çakır · 2026-06-17 · via DEV Community
Cover image for Wind 1.1.0: a Flutter text field with no MaterialApp

I was building a screen inside a CupertinoApp last week and dropped a Wind text field into it. It crashed.

Wind is utility-first styling for Flutter: you write className strings like p-3 border rounded-lg instead of nesting six widgets by hand. But WInput, the one input widget, still leaned on Material under the hood. Outside a MaterialApp it threw. The workaround was ugly: wrap a Cupertino screen in a MaterialApp just to render one field.

So in Wind 1.1.0 I rebuilt it. WInput is now Material-free.

The problem

WInput used to wrap Material's TextField, which needs a Material ancestor for its theme and ink. Drop it under a CupertinoApp or a bare WidgetsApp and you got a layout exception, not a text field. For a utility-first library that is supposed to style anything, depending on Material to render an input was the wrong shape.

// Before 1.1.0: a Wind input outside MaterialApp threw.
// The workaround was to nest a MaterialApp just to render one field.
CupertinoApp(
  home: MaterialApp(
    home: WInput(value: email, onChanged: (v) => email = v),
  ),
);

How 1.1.0 handles it

WInput now renders on EditableText with a plain BoxDecoration border. No Material ancestor required. It works under MaterialApp, CupertinoApp, or a bare WidgetsApp.

// After 1.1.0: works directly under CupertinoApp, no MaterialApp.
CupertinoApp(
  home: WInput(
    value: email,
    onChanged: (v) => setState(() => email = v),
    type: InputType.email,
    placeholder: 'you@example.com',
    className: 'p-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-sky-500',
  ),
);

One honest caveat: the long-press selection toolbar and handles need an Overlay in the tree. CupertinoApp and MaterialApp both provide one. Under a bare WidgetsApp with no Overlay, typing, cursor movement, and focus all work; only the selection toolbar is suppressed, instead of crashing like before.

className aliases

The other change I am happy with is aliases. Wind ships a token catalog, but every project has shorthands that are not in it. Before, an unknown token was a silent no-op (issue #101): you wrote a class, saw nothing, and could not tell why. Now you register your own shortcuts once, on the theme:

WindTheme(
  data: WindThemeData(
    aliases: {
      'btn': 'px-4 py-2 rounded-lg bg-sky-600 text-white',
      'btn-lg': 'btn px-6 py-4 text-lg', // aliases expand recursively
    },
  ),
  child: const MyApp(),
);

Then a bare btn works in any widget, including WDynamic (the server-driven renderer), with no extra wiring:

WDiv(className: 'btn', child: WText('Save'));

Expansion is bounded three ways (a per-chain cycle guard, a depth cap, and a total-output budget), so a circular or fan-out alias map can never hang the parser.

Also in 1.1.0

  • WIcon.foregroundColor: a runtime-dynamic icon color that overrides the text-* class, for state-driven UI. It stays out of the parser cache key, so dynamic colors do not bloat the cache.
  • WInput polish: a readonly state (so readonly: prefixed classes style it), signed-decimal number input that holds on web too, Cupertino-style selection on every platform, dark-mode label pairs on the form widgets, and a disabled field that is genuinely non-interactive.

Get started

flutter pub add fluttersdk_wind

Docs: https://fluttersdk.com/wind
Changelog: https://github.com/fluttersdk/wind/blob/master/CHANGELOG.md

If you try it, tell me what breaks in the comments.