Skip to content

Text is not responsive on a simple stack #59

@p1erre

Description

@p1erre

On the following simple section widget, I can't get the text to be responsive. It neither resize nor rescale.

I am using responsive_framework: ^0.1.4 on Flutter 2.2.3

import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:minimal/sections/section.dart';

class HeroSection extends StatelessWidget {
  const HeroSection({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Section(desktop: desktop(), mobile: desktop());
  }

  Widget desktop() {
    return Stack(
      children: [
        Image.asset(
          'assets/sections/hero/background_all.jpeg',
        ),
        Positioned(
          top: 100,
          left: 20,
          child: Text(
            'Empieza tu negocio Online',
            style: GoogleFonts.dmSans(
                textStyle: TextStyle(
              fontSize: 48,
            )),
          ),
        ),
      ],
    );
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions