import 'dart:math' as math; /// The widest the conversation's reading column grows: transcript rows and /// the floating composer share it, centred, so a wide window keeps a /// comfortable line length instead of stretching messages edge to edge. const double kChatReadingWidth = 760; /// The space on each side of the centred reading column in [width]. double chatReadingInset(double width) => math.max(0, (width - kChatReadingWidth) / 2); /// The strip left of the reading column that holds an answer's Copy button, /// outside the answer itself. const double kChatCopyGutterWidth = 48; /// The copy gutter a transcript [width] wide gives each answer: /// [kChatCopyGutterWidth] when the margin left of the centred reading column /// fits it, else 0, and Copy stays in the answer's footer (phones, narrow /// panes). double chatCopyGutter(double width) => chatReadingInset(width) >= kChatCopyGutterWidth ? kChatCopyGutterWidth : 0;